-char reply_to[512]; /* FIX make these session-specific!!! */
-long msgarr[1024];
-
/*
* Look for URL's embedded in a buffer and make them linkable. We use a
* target window in order to keep the BBS session in its own window.
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\" SIZE=+1 COLOR=\"FFFF00\"> ");
strcpy(m_subject, "");
- strcpy(reply_to, "nobody...xxxxx");
+ strcpy(WC->reply_to, "nobody...xxxxx");
while (serv_gets(buf), strncasecmp(buf, "text", 4)) {
if (!strncasecmp(buf, "nhdr=yes", 8))
nhdr = 1;
strcpy(from, &buf[5]);
}
if (!strncasecmp(buf, "path=", 5))
- strcpy(reply_to, &buf[5]);
+ strcpy(WC->reply_to, &buf[5]);
if (!strncasecmp(buf, "subj=", 5))
strcpy(m_subject, &buf[5]);
if ((!strncasecmp(buf, "hnod=", 5))
}
if ((!strcasecmp(&buf[5], serv_info.serv_nodename))
|| (!strcasecmp(&buf[5], serv_info.serv_fqdn))) {
- strcpy(reply_to, from);
+ strcpy(WC->reply_to, from);
} else if (haschar(&buf[5], '.') == 0) {
- sprintf(reply_to, "%s @ %s", from, &buf[5]);
+ sprintf(WC->reply_to, "%s @ %s", from, &buf[5]);
}
}
if (!strncasecmp(buf, "rcpt=", 5))
return (nummsgs);
}
while (serv_gets(buf), strcmp(buf, "000")) {
- msgarr[nummsgs] = atol(buf);
+ WC->msgarr[nummsgs] = atol(buf);
++nummsgs;
}
return (nummsgs);
goto DONE;
}
for (a = 0; a < nummsgs; ++a) {
- read_message(msgarr[a], oper);
+ read_message(WC->msgarr[a], oper);
}
DONE:wDumpContent(1);
#include "webcit.h"
-
-char *ExpressMessages = NULL; /* FIX move to session context */
-
-/* This variable is set to 1 if the room banner and menubar have been
- * displayed, and we need to close the <TABLE> tags.
- */
-int fake_frames = 0; /* FIX move to session context */
-
-struct urlcontent *urlstrings = NULL;
-
-
void unescape_input(char *buf)
{
int a, b;
buf[b] = 0;
u = (struct urlcontent *) malloc(sizeof(struct urlcontent));
- u->next = urlstrings;
- urlstrings = u;
+ u->next = WC->urlstrings;
+ WC->urlstrings = u;
strcpy(u->url_key, buf);
/* now chop that part off */
{
struct urlcontent *u;
- while (urlstrings != NULL) {
- free(urlstrings->url_data);
- u = urlstrings->next;
- free(urlstrings);
- urlstrings = u;
+ while (WC->urlstrings != NULL) {
+ free(WC->urlstrings->url_data);
+ u = WC->urlstrings->next;
+ free(WC->urlstrings);
+ WC->urlstrings = u;
}
}
{
struct urlcontent *u;
- for (u = urlstrings; u != NULL; u = u->next) {
+ for (u = WC->urlstrings; u != NULL; u = u->next) {
wprintf("%38s = %s\n", u->url_key, u->url_data);
}
}
{
struct urlcontent *u;
- for (u = urlstrings; u != NULL; u = u->next) {
+ for (u = WC->urlstrings; u != NULL; u = u->next) {
if (!strcasecmp(u->url_key, key))
return (u->url_data);
}
*/
void wDumpContent(int print_standard_html_footer)
{
- if (fake_frames) {
+ if (WC->fake_frames) {
wprintf("<CENTER><FONT SIZE=-1>"
"<TABLE border=0 width=100%><TR>"
"<TD><A HREF=\"/ungoto\">"
"</TR></TABLE>"
"</FONT>\n"
"</TD></TR></TABLE></TABLE>\n");
- fake_frames = 0;
+ WC->fake_frames = 0;
}
if (print_standard_html_footer) {
wprintf("</TITLE>\n"
"<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n"
"</HEAD>\n");
- if (ExpressMessages != NULL) {
+ if (WC->ExpressMessages != NULL) {
wprintf("<SCRIPT language=\"javascript\">\n");
wprintf("function ExpressMessage() {\n");
wprintf(" alert(\"");
- escputs(ExpressMessages);
+ escputs(WC->ExpressMessages);
wprintf("\")\n");
wprintf(" }\n </SCRIPT>\n");
}
*/
wprintf("<BODY ");
- if (ExpressMessages != NULL) {
+ if (WC->ExpressMessages != NULL) {
wprintf("onload=\"ExpressMessage()\" ");
- free(ExpressMessages);
- ExpressMessages = NULL;
+ free(WC->ExpressMessages);
+ WC->ExpressMessages = NULL;
}
wprintf("BACKGROUND=\"/image&name=background\" TEXT=\"#000000\" LINK=\"#004400\">\n");
wprintf("</TD></TR><TR VALIGN=TOP><TD>\n");
- fake_frames = 1;
+ WC->fake_frames = 1;
}
}
}
void ExpressMessageCat(char *buf) {
- if (ExpressMessages == NULL) {
- ExpressMessages = malloc(strlen(buf) + 4);
- strcpy(ExpressMessages, "");
+ if (WC->ExpressMessages == NULL) {
+ WC->ExpressMessages = malloc(strlen(buf) + 4);
+ strcpy(WC->ExpressMessages, "");
} else {
- ExpressMessages = realloc(ExpressMessages,
- (strlen(ExpressMessages) + strlen(buf) + 4));
+ WC->ExpressMessages = realloc(WC->ExpressMessages,
+ (strlen(WC->ExpressMessages) + strlen(buf) + 4));
}
- strcat(ExpressMessages, buf);
- strcat(ExpressMessages, "\\n");
+ strcat(WC->ExpressMessages, buf);
+ strcat(WC->ExpressMessages, "\\n");
}