void cmd_rwho(char *argbuf) {
struct CitContext *nptr;
int nContexts, i;
- int spoofed = 0;
int aide;
char room[ROOMNAMELEN];
char flags[5];
for (i=0; i<nContexts; i++) {
flags[0] = '\0';
- spoofed = 0;
if (!aide && nptr[i].state == CON_SYS)
continue;
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,
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);
}
}
printf("\033[%d;%dH\033[32m%8ld\033[0m", row, col, ++ops);
++ops_completed; // this is declared "volatile" so we don't need to lock it
if (thread_id == 0) {
- printf("\033[2;55H\033[44m\033[33m\033[1m%d ops/sec \033[0m", (ops_completed / (time(NULL) - time_started)));
+ printf("\033[2;55H\033[44m\033[33m\033[1m%ld ops/sec \033[0m", (ops_completed / (time(NULL) - time_started)));
}
fflush(stdout);
}