21 char clientsoftware[256];
28 struct whouser *wlist = NULL;
29 struct whouser *wptr = NULL;
30 char buf[256],sess,user[256],room[256],host[256];
33 printf("HTTP/1.0 200 OK\n");
36 wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
37 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>Users currently on ");
38 escputs(serv_info.serv_humannode);
39 wprintf("</B></FONT></TD></TR></TABLE>\n");
41 wprintf("<CENTER><TABLE border><TR>");
42 wprintf("<TH>Session ID</TH><TH>User Name</TH><TH>Room</TH>");
43 wprintf("<TH>From host</TH></TR>\n");
47 while(serv_gets(buf), strcmp(buf,"000")) {
48 sess = extract_int(buf, 0);
49 extract(user, buf, 1);
50 extract(room, buf, 2);
51 extract(host, buf, 3);
54 for (wptr = wlist; wptr != NULL; wptr = wptr -> next) {
55 if (wptr->sessionnum == sess) {
57 if (strcasecmp(user, wptr->username)) {
58 sprintf(buf, "%cBR%c%s",
60 strcat(wptr->username, buf);
62 if (strcasecmp(room, wptr->roomname)) {
63 sprintf(buf, "%cBR%c%s",
65 strcat(wptr->roomname, buf);
67 if (strcasecmp(host, wptr->hostname)) {
68 sprintf(buf, "%cBR%c%s",
70 strcat(wptr->hostname, buf);
76 wptr = (struct whouser *)
77 malloc(sizeof(struct whouser));
80 strcpy(wlist->username, user);
81 strcpy(wlist->roomname, room);
82 strcpy(wlist->hostname, host);
83 wlist->sessionnum = sess;
87 while (wlist != NULL) {
88 wprintf("<TR><TD>%d</TD><TD>", wlist->sessionnum);
89 escputs(wlist->username);
91 escputs(wlist->roomname);
93 escputs(wlist->hostname);
94 wprintf("</TD></TR>\n");
100 wprintf("</TABLE></CENTER>\n");
101 wprintf("</BODY></HTML>\n");