From: Art Cancro Date: Mon, 15 Mar 2004 22:47:09 +0000 (+0000) Subject: * Prettied up the chat window a little more. X-Git-Tag: v7.86~5527 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=18df475d7d69f09b5797d316dd6bde59fdaccf7e;p=citadel.git * Prettied up the chat window a little more. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index ba157ea5a..7f6e1c796 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/paging.c b/webcit/paging.c index b3d4b1777..7b149e932 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -338,19 +338,51 @@ void chat_recv(void) { extract_token(cl_text, buf, 1, '|'); wprintf("parent.chat_transcript.document.write('"); - wprintf(""); - wprintf(""); - if (!strcasecmp(cl_user, WC->wc_username)) { + + if (strcasecmp(cl_user, WC->last_chat_user)) { + wprintf("" + "
" + ); + + } + + wprintf(""); + + wprintf("
"); + + if (!strcasecmp(cl_user, ":")) { wprintf(""); } - jsescputs(cl_user); - wprintf(": "); - if (strcasecmp(cl_user, WC->wc_username)) { - wprintf(""); + + if (strcasecmp(cl_user, WC->last_chat_user)) { + wprintf(""); + + if (!strcasecmp(cl_user, WC->wc_username)) { + wprintf(""); + } + else { + wprintf(""); + } + jsescputs(cl_user); + + wprintf(": "); + } + else { + wprintf("   "); } jsescputs(cl_text); - wprintf("
"); + if (!strcasecmp(cl_user, ":")) { + wprintf(""); + } + + wprintf("
"); wprintf("'); \n"); + + strcpy(WC->last_chat_user, cl_user); } wprintf("parent.chat_transcript.scrollTo(999999,999999);\">\n"); diff --git a/webcit/webcit.h b/webcit/webcit.h index 5809e8b81..d600c4131 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -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,'|')