Skip to content
Snippets Groups Projects
Commit d52c843d authored by rswindell's avatar rswindell
Browse files

@UPTIME@ won't display negative up times.

parent d5d439f2
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,8 @@ int sbbs_t::atcodes(char *instr)
else if(!strcmp(sp,"UPTIME")) {
extern time_t uptime;
time_t up=time(NULL)-uptime;
if(up<0)
up=0;
char days[64]="";
if((up/(24*60*60))>=2) {
sprintf(days,"%u days ",up/(24*60*60));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment