Commit 9a1d18d4 authored by rswindell's avatar rswindell
Browse files

For Nelgin, new @-codes

- FIRSTON (date and time user first logged on)
- FIRSTDATEON (same as SINCE)
- FIRSTTIMEON (time of day of user's first logon)
parent 649f94d8
......@@ -806,6 +806,27 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode)
return(str);
}
if(!strcmp(sp,"FIRSTON"))
return(timestr(useron.firston));
if(!strcmp(sp,"FIRSTDATEON"))
return(unixtodstr(&cfg,useron.firston,str));
if(!strcmp(sp,"FIRSTTIMEON")) {
memset(&tm,0,sizeof(tm));
localtime32(&useron.firston,&tm);
if(cfg.sys_misc&SM_MILITARY)
safe_snprintf(str,maxlen,"%02d:%02d:%02d"
,tm.tm_hour, tm.tm_min, tm.tm_sec);
else
safe_snprintf(str,maxlen,"%02d:%02d %s"
,tm.tm_hour==0 ? 12
: tm.tm_hour>12 ? tm.tm_hour-12
: tm.tm_hour, tm.tm_min, tm.tm_hour>11 ? "pm":"am");
return(str);
}
if(!strcmp(sp,"MSGLEFT") || !strcmp(sp,"MSGSLEFT")) {
safe_snprintf(str,maxlen,"%u",useron.posts);
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