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

More @-codes for bigger units of free disk space

- FREESPACEM - Mebibytes
- FREESPACEG - Gibibytes
- FREESPACET - Tebibytes

Mr. Millionaire's request.
parent bba2a9d5
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #940 passed
...@@ -1126,6 +1126,21 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool ...@@ -1126,6 +1126,21 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return(str); return(str);
} }
if(strcmp(sp,"FREESPACEM") == 0) {
safe_snprintf(str,maxlen,"%lu",getfreediskspace(cfg.temp_dir, 1024 * 1024));
return(str);
}
if(strcmp(sp,"FREESPACEG") == 0) {
safe_snprintf(str,maxlen,"%lu",getfreediskspace(cfg.temp_dir, 1024 * 1024 * 1024));
return(str);
}
if(strcmp(sp,"FREESPACET") == 0) {
safe_snprintf(str,maxlen,"%lu",getfreediskspace(cfg.temp_dir, 1024 * 1024 * 1024) / 1024);
return(str);
}
if(!strcmp(sp,"UPBYTES")) { if(!strcmp(sp,"UPBYTES")) {
safe_snprintf(str,maxlen,"%lu",useron.ulb); safe_snprintf(str,maxlen,"%lu",useron.ulb);
return(str); return(str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment