* Completed support for add/remove mailing list recipients.
authorArt Cancro <ajc@citadel.org>
Tue, 11 Dec 2001 16:02:41 +0000 (16:02 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 11 Dec 2001 16:02:41 +0000 (16:02 +0000)
webcit/ChangeLog
webcit/README.txt
webcit/roomops.c
webcit/webcit.c
webcit/webcit.h

index d8f16b40a1130a7b6a95ede0e0fa61d95ac7a9a4..ad8b681682f351abfba83cf0932de4179f8c1e43 100644 (file)
@@ -1,4 +1,7 @@
 $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)
 
@@ -656,3 +659,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 4dd93b1964043bfdf9a34e292a1b0b96cf7383d5..554f2caea704dec48fc6181266116451da675aea 100644 (file)
@@ -1,5 +1,5 @@
                       WEBCIT for the Citadel/UX System
-                               version 3.01
+                               version 3.10
  
    Copyright (C) 1996-2001 by the authors.  Portions written by:
        Art Cancro
index 4af0ac68eb2dee53007a551c7b9308f114628c99..754bc28b069eac74573dac20baaf5bc0868567b1 100644 (file)
@@ -929,7 +929,7 @@ void display_editroom(void)
        /* 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");
 
@@ -948,6 +948,12 @@ void display_editroom(void)
 
                        }
                }
+               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);
@@ -1486,6 +1492,16 @@ void delete_room(void)
 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) {
@@ -1503,7 +1519,7 @@ void netedit(void) {
 
        /* 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);
                }
        }
@@ -1523,7 +1539,7 @@ void netedit(void) {
        }
 
        if (!strcasecmp(bstr("cmd"), "add")) {
-               serv_puts(bstr("line"));
+               serv_puts(line);
        }
 
        serv_puts("000");
index 0fd9569942ae5f049c91098e26af4b4c843a13a7..8aa27b7ca02b7f8ba8e48f0e339f47f8b1e80164 100644 (file)
@@ -237,13 +237,13 @@ void escputs(char *strbuf)
 
 /*
  * 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, "");
 
index 3062a041640db65f7815df0812a3b6e19f4b6d09..ae26ff62497c32365680ce9074814545c57395f6 100644 (file)
@@ -10,7 +10,7 @@
 #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 */