Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 9d00b70b authored by rswindell's avatar rswindell

Add:

- TTOTAL (time in minutes from all previous logons, in HH:MM:SS)
- TTODAY (time in used from previous logons today, in H:MM:SS)
- MTOTAL (time in minutes from all previous logons)
- MTODAY (time in minutes from previous logons today)
- MPERC (minutes allowed per call, alias to TIMELIMIT)
- MPERD (minutes allowed per day)
parent 8525a9b6
......@@ -775,11 +775,16 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode)
if(!strcmp(sp,"TPERC")) /* Synchronet only */
return(sectostr(cfg.level_timepercall[useron.level],str)+1);
if(!strcmp(sp,"TIMELIMIT")) {
if(strcmp(sp, "MPERC") == 0 || strcmp(sp, "TIMELIMIT") == 0) {
safe_snprintf(str,maxlen,"%u",cfg.level_timepercall[useron.level]);
return(str);
}
if(strcmp(sp, "MPERD") == 0) {
safe_snprintf(str,maxlen,"%u",cfg.level_timeperday[useron.level]);
return str;
}
if(!strcmp(sp,"MINLEFT") || !strcmp(sp,"LEFT") || !strcmp(sp,"TIMELEFT")) {
gettimeleft();
safe_snprintf(str,maxlen,"%lu",timeleft/60);
......@@ -851,11 +856,22 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode)
return str;
}
if(strcmp(sp, "TTODAY") == 0) {
if(strcmp(sp, "MTODAY") == 0) {
safe_snprintf(str, maxlen, "%u", useron.ttoday);
return str;
}
if(strcmp(sp, "MTOTAL") == 0) {
safe_snprintf(str, maxlen, "%u", useron.timeon);
return str;
}
if(strcmp(sp, "TTODAY") == 0)
return sectostr(useron.ttoday, str) + 1;
if(strcmp(sp, "TTOTAL") == 0)
return sectostr(useron.timeon, str);
if(strcmp(sp, "TLAST") == 0) {
safe_snprintf(str, maxlen, "%u", useron.tlast);
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