Skip to content
Snippets Groups Projects
Commit 85f4b96f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add MSGS @-code - total messages in current sub-board

Unlike SMB_MSGS, the sub-board does not have to be already open.

As requested/reported by Finglonger (SILENT)
parent 3122a36b
Branches
Tags
No related merge requests found
Pipeline #8663 passed
......@@ -815,6 +815,12 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode,
if (strcmp(sp, "GENDERS") == 0)
return cfg.new_genders;
if (strcmp(sp, "MSGS") == 0) {
int msgs = usrgrps ? getposts(&cfg, usrsub[curgrp][cursub[curgrp]]) : 0;
snprintf(str, maxlen, "%u", msgs);
return str;
}
if (!strcmp(sp, "TMSG")) {
l = 0;
for (i = 0; i < cfg.total_subs; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment