]> code.citadel.org Git - citadel.git/blobdiff - webcit/paging.c
* Prettied up the chat window a little more.
[citadel.git] / webcit / paging.c
index b3d4b177765e506cac6f741571d05d77c8813f12..7b149e93281ddee47f58512c0ae541dba593c436 100644 (file)
@@ -338,19 +338,51 @@ void chat_recv(void) {
                        extract_token(cl_text, buf, 1, '|');
 
                        wprintf("parent.chat_transcript.document.write('");
-                       wprintf("<FONT SIZE=-1>");
-                       wprintf("<B>");
-                       if (!strcasecmp(cl_user, WC->wc_username)) {
+
+                       if (strcasecmp(cl_user, WC->last_chat_user)) {
+                               wprintf("<TABLE border=0 WIDTH=100%% "
+                                       "CELLSPACING=1 CELLPADDING=0 "
+                                       "BGCOLOR=&quot;#FFFFFF&quot;>"
+                                       "<TR><TD></TR></TD></TABLE>"
+                               );
+
+                       }
+
+                       wprintf("<TABLE border=0 WIDTH=100%% "
+                               "CELLSPACING=0 CELLPADDING=0 "
+                               "BGCOLOR=&quot;#EEEEEE&quot;>");
+
+                       wprintf("<TR><TD>");
+
+                       if (!strcasecmp(cl_user, ":")) {
                                wprintf("<I>");
                        }
-                       jsescputs(cl_user);
-                       wprintf(": ");
-                       if (strcasecmp(cl_user, WC->wc_username)) {
-                               wprintf("</B>");
+
+                       if (strcasecmp(cl_user, WC->last_chat_user)) {
+                               wprintf("<B>");
+
+                               if (!strcasecmp(cl_user, WC->wc_username)) {
+                                       wprintf("<FONT COLOR=&quot;#FF0000&quot;>");
+                               }
+                               else {
+                                       wprintf("<FONT COLOR=&quot;#0000FF&quot;>");
+                               }
+                               jsescputs(cl_user);
+
+                               wprintf("</FONT>: </B>");
+                       }
+                       else {
+                               wprintf("&nbsp;&nbsp;&nbsp;");
                        }
                        jsescputs(cl_text);
-                       wprintf("</I></B></FONT><BR>");
+                       if (!strcasecmp(cl_user, ":")) {
+                               wprintf("</I>");
+                       }
+
+                       wprintf("</TD></TR></TABLE>");
                        wprintf("'); \n");
+
+                       strcpy(WC->last_chat_user, cl_user);
                }
 
                wprintf("parent.chat_transcript.scrollTo(999999,999999);\">\n");