$Log$
+Revision 410.9 2003/04/09 04:02:32 ajc
+* Remove the defaulthost/defaultport vs. c_host/c_port stuff -- we haven't
+ supported the idea of one WebCit connecting to multiple Citadels for a
+ long time. Now it's just one set of variables, called ctdlhost/ctdlport.
+* When connecting to Citadel through a Unix domain socket, don't try to make
+ the Java chat applet available.
+
Revision 410.8 2003/03/31 03:32:19 ajc
* messages.c: check for 000 terminator while parsing RFC822 headers to
prevent getting hung up while displaying certain badly formatted messages.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
wprintf("<B>Real-time chat</B>\n");
wprintf("</FONT></TD></TR></TABLE>\n");
- wprintf("A chat window should be appearing on your screen ");
- wprintf("momentarily. When you're ");
- wprintf("done, type <TT>/quit</TT> to exit. You can also ");
- wprintf("type <TT>/help</TT> for more commands.\n");
-
- wprintf("<applet codebase=\"/static\" ");
- wprintf("code=\"wcchat\" width=2 height=2>\n");
- wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
- wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
- wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
- wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
- wprintf("so you won't be able to access Chat. Sorry.\n");
- wprintf("</applet>\n");
+ if (!strcasecmp(ctdlhost, "uds")) {
+ wprintf("<I>Sorry ... chat is not available here.</i></BR>\n");
+ }
+ else {
+ wprintf("A chat window should be appearing on your screen ");
+ wprintf("momentarily. When you're ");
+ wprintf("done, type <TT>/quit</TT> to exit. You can also ");
+ wprintf("type <TT>/help</TT> for more commands.\n");
+
+ wprintf("<applet codebase=\"/static\" ");
+ wprintf("code=\"wcchat\" width=2 height=2>\n");
+ wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
+ wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
+ wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
+ wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
+ wprintf("so you won't be able to access Chat. Sorry.\n");
+ wprintf("</applet>\n");
+ }
wDumpContent(1);
}
/* We stuff these with the values coming from the client cookies,
* so we can use them to reconnect a timed out session if we have to.
*/
- char c_host[SIZ];
- char c_port[SIZ];
char c_username[SIZ];
char c_password[SIZ];
char c_roomname[SIZ];
char cookie[SIZ];
- strcpy(c_host, defaulthost);
- strcpy(c_port, defaultport);
strcpy(c_username, "");
strcpy(c_password, "");
strcpy(c_roomname, "");
/*
* If we're not connected to a Citadel server, try to hook up the
- * connection now. Preference is given to the host and port specified
- * by browser cookies, if cookies have been supplied.
+ * connection now.
*/
if (!WC->connected) {
- if (strlen(bstr("host")) > 0)
- strcpy(c_host, bstr("host"));
- if (strlen(bstr("port")) > 0)
- strcpy(c_port, bstr("port"));
-
- if (!strcasecmp(c_host, "uds")) {
+ if (!strcasecmp(ctdlhost, "uds")) {
/* unix domain socket */
- sprintf(buf, "%s/citadel.socket", c_port);
+ sprintf(buf, "%s/citadel.socket", ctdlport);
WC->serv_sock = uds_connectsock(buf);
}
else {
/* tcp socket */
- WC->serv_sock = tcp_connectsock(c_host, c_port);
+ WC->serv_sock = tcp_connectsock(ctdlhost, ctdlport);
}
if (WC->serv_sock < 0) {
struct serv_info serv_info;
extern char floorlist[128][SIZ];
extern char *axdefs[];
-extern char *defaulthost, *defaultport;
+extern char *ctdlhost, *ctdlport;
extern char *server_cookie;
extern struct wcsubst *global_subst;
char *server_cookie = NULL;
-char *defaulthost = DEFAULT_HOST;
-char *defaultport = DEFAULT_PORT;
+char *ctdlhost = DEFAULT_HOST;
+char *ctdlport = DEFAULT_PORT;
/*
* This is a generic function to set up a master socket for listening on
}
if (optind < argc) {
- defaulthost = argv[optind];
+ ctdlhost = argv[optind];
if (++optind < argc)
- defaultport = argv[optind];
+ ctdlport = argv[optind];
}
/* Tell 'em who's in da house */
lprintf(1, SERVER "\n"