]> code.citadel.org Git - citadel.git/blobdiff - webcit/who.c
* fix Nullpointer Access in msgescputs
[citadel.git] / webcit / who.c
index 5bf70b1a8634659f0bdf2b218cea256a6fec0c52..0cffbebde0dbebe3c87ff1cb70d68167c86c69c7 100644 (file)
@@ -471,11 +471,12 @@ void WholistSubst(StrBuf *TemplBuffer, void *vContext)
        SVPutBuf("WHO:HOST", User->Host, 1);
        SVPutBuf("WHO:REALROOM", User->RealRoom, 1);
        SVPutBuf("WHO:REALHOST", User->RealHost, 1);
-       svprintf(HKEY("WHO:LASTACTIVE"), WCS_STRING, "%ld", User->LastActive);
-       svprintf(HKEY("WHO:SESSION"), WCS_STRING, "%d", User->Session);
-       svprintf(HKEY("WHO:IDLE"), WCS_STRING, "%s", (User->Idle)? "Idle":"Active");
-       svprintf(HKEY("WHO:NSESSIONS"), WCS_STRING, "%d", User->SessionCount);
-       
+       svputlong("WHO:LASTACTIVE", User->LastActive);
+       ///svputlong("WHO:IDLESINCE",(now - User->LastActive) / 60);//// todo
+       svputlong("WHO:SESSION", User->Session);
+       svputlong("WHO:IDLE", User->Idle);
+       svputlong("WHO:NSESSIONS", User->SessionCount);
+       svputlong("WHO:ISME", (User->Session == WC->ctdl_pid));
 }
 
 void DeleteWholistHash(HashList *KillMe)