$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
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
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="#FFFFFF">"
+ "<TR><TD></TR></TD></TABLE>"
+ );
+
+ }
+
+ wprintf("<TABLE border=0 WIDTH=100%% "
+ "CELLSPACING=0 CELLPADDING=0 "
+ "BGCOLOR="#EEEEEE">");
+
+ 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="#FF0000">");
+ }
+ else {
+ wprintf("<FONT COLOR="#0000FF">");
+ }
+ jsescputs(cl_user);
+
+ wprintf("</FONT>: </B>");
+ }
+ else {
+ wprintf(" ");
}
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");
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,'|')