$Log$
+Revision 301.16 2001/12/11 16:02:40 ajc
+* Completed support for add/remove mailing list recipients.
+
Revision 301.15 2001/12/11 15:22:53 ajc
* Began constructing the listserv screen for config (not tested)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
/* Mailing list management */
if (!strcmp(tab, "listserv")) {
- wprintf("<center><i>The contents of this room are being "
+ wprintf("<BR><center><i>The contents of this room are being "
"mailed to the following list recipients:"
"</i><br><br>\n");
}
}
+ wprintf("<BR><FORM METHOD=\"POST\" ACTION=\"/netedit\">\n"
+ "<INPUT TYPE=\"hidden\" NAME=\"tab\" VALUE=\"listserv\">\n"
+ "<INPUT TYPE=\"hidden\" NAME=\"prefix\" VALUE=\"listrecp|\">\n");
+ wprintf("<INPUT TYPE=\"text\" NAME=\"line\">\n");
+ wprintf("<INPUT TYPE=\"submit\" NAME=\"cmd\" VALUE=\"Add\">");
+ wprintf("</FORM><BR></CENTER>\n");
}
wDumpContent(1);
void netedit(void) {
FILE *fp;
char buf[SIZ];
+ char line[SIZ];
+
+ if (strlen(bstr("line"))==0) {
+ display_editroom();
+ return;
+ }
+
+ strcpy(line, bstr("prefix"));
+ strcat(line, bstr("line"));
+ strcat(line, bstr("suffix"));
fp = tmpfile();
if (fp == NULL) {
/* This loop works for add *or* remove. Spiffy, eh? */
while (serv_gets(buf), strcmp(buf, "000")) {
- if (strcasecmp(buf, bstr("line"))) {
+ if (strcasecmp(buf, line)) {
fprintf(fp, "%s\n", buf);
}
}
}
if (!strcasecmp(bstr("cmd"), "add")) {
- serv_puts(bstr("line"));
+ serv_puts(line);
}
serv_puts("000");
/*
* Escape a string for feeding out as a URL.
- * FIXME this is not threadsafe!
+ * FIXME ... not threadsafe!
*/
char *urlesc(char *strbuf)
{
int a, b, c;
char *ec = " #&;`'|*?-~<>^()[]{}$\\";
- static char outbuf[1024];
+ static char outbuf[SIZ];
strcpy(outbuf, "");
#define SERVER "WebCit v3.01" /* who's in da house */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 301
+#define CLIENT_VERSION 310
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define LB (1) /* Internal escape chars */