- if (strlen(output_data) > 0) {
-
- if (output_data[strlen(output_data)-1] == '\n') {
- output_data[strlen(output_data)-1] = 0;
- }
-
- /* Output our fun to the other frame. */
- wprintf("<IMG SRC=\"/static/blank.gif\" WIDTH=1 HEIGHT=1\n"
- "onLoad=\" \n"
- );
-
- for (i=0; i<num_tokens(output_data, '\n'); ++i) {
- extract_token(buf, output_data, i, '\n');
- extract_token(cl_user, buf, 0, '|');
- extract_token(cl_text, buf, 1, '|');
-
- if (strcasecmp(cl_text, "NOOP")) {
-
- wprintf("parent.chat_transcript.document.write('");
-
- 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>");
- }
-
- 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);
- 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");
- }
-
- free(output_data);
-
- wprintf("</BODY></HTML>\n");
- wDumpContent(0);