Commit bc007231 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

More @-codes for bigger units of free disk space

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

Mr. Millionaire's request.
parent bba2a9d5
Pipeline #940 passed with stage
in 16 minutes and 30 seconds
......@@ -1126,6 +1126,21 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
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")) {
safe_snprintf(str,maxlen,"%lu",useron.ulb);
return(str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment