+
+/*
+ * list users in chat in this room
+ */
+void roomchat_rwho(char *argbuf) {
+ struct CitContext *nptr;
+ int nContexts, i;
+
+ if (!CC->cs_flags & CS_CHAT) {
+ cprintf("%d Session is not in chat mode.\n", ERROR);
+ return;
+ }
+
+ cprintf("%d%c \n", LISTING_FOLLOWS, CtdlCheckExpress() );
+
+ nptr = CtdlGetContextArray(&nContexts) ; // grab a copy of the wholist
+ if (nptr) {
+ for (i=0; i<nContexts; i++) { // list the users
+ if ( (nptr[i].room.QRnumber == CC->room.QRnumber)
+ && (nptr[i].cs_flags & CS_CHAT)
+ ) {
+ cprintf("%s\n", nptr[i].user.fullname);
+ }
+ }
+ free(nptr); // free our copy
+ }
+
+ cprintf("000\n");
+}
+
+
+