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

New @-codes to display credit percentages awarded for up/downloads for curdir

- UCP (upload credit percentage)
- DCP (download credit percentage)
parent 72240049
No related branches found
No related tags found
No related merge requests found
Pipeline #9018 passed
......@@ -1883,6 +1883,16 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode,
return str;
}
if (strcmp(sp, "UCP") == 0) {
safe_snprintf(str, maxlen, "%u", usrlibs ? cfg.dir[usrdir[curlib][curdir[curlib]]]->dn_pct : 0);
return str;
}
if (strcmp(sp, "DCP") == 0) {
safe_snprintf(str, maxlen, "%u", usrlibs ? cfg.dir[usrdir[curlib][curdir[curlib]]]->up_pct : 0);
return str;
}
if (!strcmp(sp, "NOACCESS")) {
if (noaccess_str == text[NoAccessTime])
safe_snprintf(str, maxlen, noaccess_str, noaccess_val / 60, noaccess_val % 60);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment