]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
New way to display incoming instant messages. Not finished.
[citadel.git] / webcit / webcit.c
index 84747e300e886113c03ad214db910044fc3f353f..046c603d738e6408dec77c9748727058139d4a3b 100644 (file)
@@ -390,11 +390,10 @@ void output_headers(      int do_httpheaders,     /* 1 = output HTTP headers
        /* ICONBAR */
        if (do_htmlhead) {
 
-               if (WC->HaveInstantMessages) {
-                       wprintf("<div id=\"page_popup\">\n");
-                       page_popup();
-                       wprintf("</div>\n");
-               }
+               /* check for instant messages (these display in a new window) */
+               page_popup();
+
+               /* check for ImportantMessages (these display in a div overlaying the main screen) */
                if (strlen(WC->ImportantMessage) > 0) {
                        wprintf("<div id=\"important_message\">\n");
                        wprintf("<SPAN CLASS=\"imsg\">"
@@ -438,18 +437,6 @@ void http_redirect(char *whichpage) {
 
 
 
-void check_for_instant_messages()
-{
-       char buf[SIZ];
-
-       serv_puts("NOOP");
-       serv_getln(buf, sizeof buf);
-       if (buf[3] == '*') WC->HaveInstantMessages = 1;
-}
-
-
-
-
 /* 
  * Output a piece of content to the web browser
  */
@@ -1232,11 +1219,6 @@ void session_loop(struct httprequest *req)
                }
        }
 
-       /*
-        * If there are instant messages waiting, retrieve them for display.
-        */
-       check_for_instant_messages();
-
        if (!strcasecmp(action, "image")) {
                output_image();