]> code.citadel.org Git - citadel.git/blobdiff - webcit/who.c
* Installed the final batch of new icons
[citadel.git] / webcit / who.c
index 18d1f0844ae063c0b5cf5fe108d35780d6948c6d..ec6e19e86f58bca50eb62585fe2f6f9c975e1489 100644 (file)
@@ -53,7 +53,7 @@ void whobbs(void)
 
        wprintf("<div id=\"banner\">\n");
        wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
-       wprintf("<IMG SRC=\"/static/users-icon.gif\" ALT=\" \" ALIGN=MIDDLE>");
+       wprintf("<IMG SRC=\"/static/usermanag_48x.gif\" ALT=\" \" ALIGN=MIDDLE>");
        wprintf("<SPAN CLASS=\"titlebar\">&nbsp;Users currently on ");
        escputs(serv_info.serv_humannode);
        wprintf("</SPAN></TD><TD ALIGN=RIGHT>");
@@ -71,7 +71,7 @@ void whobbs(void)
        wprintf("<TH>From host</TH>\n</TR>\n");
 
        serv_puts("TIME");
-       serv_gets(buf);
+       serv_getln(buf, sizeof buf);
        if (buf[0] == '2') {
                now = extract_long(&buf[4], 0);
        }
@@ -80,15 +80,15 @@ void whobbs(void)
        }
 
        serv_puts("RWHO");
-       serv_gets(buf);
+       serv_getln(buf, sizeof buf);
        if (buf[0] == '1') {
-               while (serv_gets(buf), strcmp(buf, "000")) {
+               while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                        sess = extract_int(buf, 0);
-                       extract(user, buf, 1);
-                       extract(room, buf, 2);
-                       extract(host, buf, 3);
-                       extract(realroom, buf, 9);
-                       extract(realhost, buf, 10);
+                       extract_token(user, buf, 1, '|', sizeof user);
+                       extract_token(room, buf, 2, '|', sizeof room);
+                       extract_token(host, buf, 3, '|', sizeof host);
+                       extract_token(realroom, buf, 9, '|', sizeof realroom);
+                       extract_token(realhost, buf, 10, '|', sizeof realhost);
                        last_activity = extract_long(buf, 5);
 
                        bg = 1 - bg;
@@ -112,7 +112,7 @@ void whobbs(void)
                        wprintf("</TD>");
 
                        /* (link to page this user) */
-                       wprintf("<TD><A HREF=\"/display_page&recp=");
+                       wprintf("<TD><A HREF=\"/display_page?recp=");
                        urlescputs(user);
                        wprintf("\">"
                                "<IMG ALIGN=MIDDLE WIDTH=20 HEIGHT=15 "
@@ -126,9 +126,15 @@ void whobbs(void)
                        if ((now - last_activity) > 900L) {
                                wprintf("&nbsp;"
                                        "<IMG ALIGN=MIDDLE "
-                                       "SRC=\"/static/idle.gif\" "
+                                       "SRC=\"/static/inactiveuser_24x.gif\" "
                                        "ALT=\"[idle]\" BORDER=0>");
                        }
+                       else {
+                               wprintf("&nbsp;"
+                                       "<IMG ALIGN=MIDDLE "
+                                       "SRC=\"/static/activeuser_24x.gif\" "
+                                       "ALT=\"[active]\" BORDER=0>");
+                       }
                        wprintf("</TD>\n\t<TD>");
 
 
@@ -164,8 +170,7 @@ void whobbs(void)
                "<div align=center>"
                "Click on a name to read user info.  Click on "
                "<IMG ALIGN=MIDDLE SRC=\"/static/page.gif\" ALT=\"(p)\" "
-               "BORDER=0> to send "
-               "a page (instant message) to that user.</div>\n");
+               "BORDER=0> to send an instant message to that user.</div>\n");
        wDumpContent(1);
 }
 
@@ -175,7 +180,7 @@ void terminate_session(void)
        char buf[SIZ];
 
        serv_printf("TERM %s", bstr("which_session"));
-       serv_gets(buf);
+       serv_getln(buf, sizeof buf);
        whobbs();
 }
 
@@ -189,15 +194,15 @@ void edit_me(void)
 
        if (!strcasecmp(bstr("sc"), "Change room name")) {
                serv_printf("RCHG %s", bstr("fake_roomname"));
-               serv_gets(buf);
+               serv_getln(buf, sizeof buf);
                http_redirect("/whobbs");
        } else if (!strcasecmp(bstr("sc"), "Change host name")) {
                serv_printf("HCHG %s", bstr("fake_hostname"));
-               serv_gets(buf);
+               serv_getln(buf, sizeof buf);
                http_redirect("/whobbs");
        } else if (!strcasecmp(bstr("sc"), "Change user name")) {
                serv_printf("UCHG %s", bstr("fake_username"));
-               serv_gets(buf);
+               serv_getln(buf, sizeof buf);
                http_redirect("/whobbs");
        } else if (!strcasecmp(bstr("sc"), "Cancel")) {
                http_redirect("/whobbs");