Added context state to output of RWHO command.
[citadel.git] / citadel / server / modules / rwho / serv_rwho.c
index 96e25e7877afd70cd2a1858730d2a7fec6ff2f55..d028c9b3f4e2b4f5832ce0deb8e3aaac7ca65b5a 100644 (file)
@@ -63,7 +63,6 @@ void GenerateRoomDisplay(char *real_room, CitContext *viewed, CitContext *viewer
 void cmd_rwho(char *argbuf) {
        struct CitContext *nptr;
        int nContexts, i;
-       int spoofed = 0;
        int aide;
        char room[ROOMNAMELEN];
        char flags[5];
@@ -83,7 +82,6 @@ void cmd_rwho(char *argbuf) {
        
        for (i=0; i<nContexts; i++)  {
                flags[0] = '\0';
-               spoofed = 0;
                
                if (!aide && nptr[i].state == CON_SYS)
                        continue;
@@ -100,17 +98,12 @@ void cmd_rwho(char *argbuf) {
                   
                GenerateRoomDisplay(room, &nptr[i], CC);
 
-                if ((aide) && (spoofed)) {
-                       strcat(flags, "+");
-               }
-               
                if ((nptr[i].cs_flags & CS_STEALTH) && (aide)) {
                        strcat(flags, "-");
                }
                
                if (((nptr[i].cs_flags&CS_STEALTH)==0) || (aide)) {
-
-                       cprintf("%d|%s|%s|%s|%s|%ld|%s|%s|",
+                       cprintf("%d|%s|%s|%s|%s|%ld|%s|%s||||%d|%d\n",
                                nptr[i].cs_pid,
                                (nptr[i].logged_in ? nptr[i].curr_user : NLI),
                                room,
@@ -118,14 +111,10 @@ void cmd_rwho(char *argbuf) {
                                nptr[i].cs_clientname,
                                (long)(nptr[i].lastidle),
                                nptr[i].lastcmdname,
-                               flags
+                               flags,
+                               nptr[i].logged_in,
+                               nptr[i].state
                        );
-
-                       cprintf("|");   // no spoofed user names anymore
-                       cprintf("|");   // no spoofed room names anymore
-                       cprintf("|");   // no spoofed host names anymore
-       
-                       cprintf("%d\n", nptr[i].logged_in);
                }
        }