userlist: removed (not logged in) message on iconbar
authorThierry Pasqualier <thierry@uncensored.citadel.org>
Sat, 7 Jul 2007 14:10:24 +0000 (14:10 +0000)
committerThierry Pasqualier <thierry@uncensored.citadel.org>
Sat, 7 Jul 2007 14:10:24 +0000 (14:10 +0000)
webcit/summary.c
webcit/webcit.h

index 30b168c3e6d5e94b8534713c0223a254dbb2d341..adc70ec5b1f20ded33e34402e6ad5489f76e722d 100644 (file)
@@ -85,11 +85,13 @@ void wholist_section(void) {
        serv_getln(buf, sizeof buf);
        if (buf[0] == '1') while(serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                extract_token(user, buf, 1, '|', sizeof user);
-                wprintf("<li><a href=\"showuser?who=");
-                urlescputs(user);
-                wprintf("\">");
-                escputs(user);
-                wprintf("</a></li>");
+               if (strcmp(user, NLI)) {
+                       wprintf("<li><a href=\"showuser?who=");
+                       urlescputs(user);
+                       wprintf("\">");
+                       escputs(user);
+                       wprintf("</a></li>");
+               }
        }
 }
 
index d2b7e94ead2cf712cbf0c0b1d2cb690e21d319ea..a5f5f101117c5dc73ab6d84791f680367f8ef32b 100644 (file)
@@ -200,6 +200,11 @@ extern locale_t wc_locales[];
                        US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
                        US_FLOORS | US_COLOR | US_PROMPTCTL )
 
+/*
+ * NLI is the string that shows up in a who's online listing for sessions
+ * that are active, but for which no user has yet authenticated.
+ */
+#define NLI    "(not logged in)"
 
 
 /** \brief     Linked list of lines appearing in an HTTP client request */