* Prettied up the chat window a little more.
authorArt Cancro <ajc@citadel.org>
Mon, 15 Mar 2004 22:47:09 +0000 (22:47 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 15 Mar 2004 22:47:09 +0000 (22:47 +0000)
webcit/ChangeLog
webcit/paging.c
webcit/webcit.h

index ba157ea5a209861928aae187231d49cc0f784cf6..7f6e1c79637afacf4e55e997e97b68fc5c44d5c0 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 505.16  2004/03/15 22:47:09  ajc
+* Prettied up the chat window a little more.
+
 Revision 505.15  2004/03/15 04:27:44  ajc
 * Chat now appears in a separate window
 * Use regular frames instead of IFRAMEs for chat
@@ -1724,4 +1727,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
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");
index 5809e8b81b44fb80233c9559cb3599245d7c16b7..d600c413144cbece6cf40ee9059b564f30363fbc 100644 (file)
@@ -218,6 +218,7 @@ struct wcsession {
        char ImportantMessage[SIZ];
        int outside_frameset_allowed;   /* nonzero if current req is allowed
                                         * outside of the main frameset */
+       char last_chat_user[SIZ];
 };
 
 #define extract(dest,source,parmnum)   extract_token(dest,source,parmnum,'|')