]> code.citadel.org Git - citadel.git/commitdiff
* WebCit list subscription integration
authorArt Cancro <ajc@citadel.org>
Wed, 14 Aug 2002 02:36:05 +0000 (02:36 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 14 Aug 2002 02:36:05 +0000 (02:36 +0000)
citadel/ChangeLog
citadel/serv_listsub.c
citadel/techdoc/netconfigs.txt

index c52e1f947e0299925d6061cc13d83d71f989b6a0..fa26bbb9685ad6e834323d290a977c3585365c41 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 591.92  2002/08/14 02:36:05  ajc
+ * WebCit list subscription integration
+
  Revision 591.91  2002/08/13 18:48:46  ajc
  * Generate and send subscription confirmation requests.
    (Still need to finalize the URL format)
@@ -3901,4 +3904,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 110813bdf949a5d183e9934c7eab7fa9795096a5..7a4cfaba71355b1d5466a966286e2b6d1690f1ba 100644 (file)
@@ -82,7 +82,7 @@ void listsub_generate_token(char *buf) {
 /*
  * Enter a subscription request
  */
-void do_subscribe(char *room, char *email, char *subtype) {
+void do_subscribe(char *room, char *email, char *subtype, char *webpage) {
        struct quickroom qrbuf;
        FILE *ncfp;
        char filename[SIZ];
@@ -100,11 +100,12 @@ void do_subscribe(char *room, char *email, char *subtype) {
        assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
        ncfp = fopen(filename, "a");
        if (ncfp != NULL) {
-               fprintf(ncfp, "subpending|%s|%s|%s|%ld\n",
+               fprintf(ncfp, "subpending|%s|%s|%s|%ld|%s\n",
                        email,
                        subtype,
                        token,
-                       time(NULL)
+                       time(NULL),
+                       webpage
                );
                fclose(ncfp);
        }
@@ -117,12 +118,12 @@ void do_subscribe(char *room, char *email, char *subtype) {
                "<%s> to the '%s' mailing list.\n\n"
                "In order to confirm this subscription request, please\n"
                "point your web browser at the following location:\n\n"
-               "http://FIXME.com:FIXME/blah?room=%s&token=%s\n\n"
+               "http://%s?room=%s&token=%s\n\n"
                "If this request has been submitted in error and you do not\n"
                "wish to receive the '%s' mailing list, simply do nothing,\n"
                "and you will not receive any further mailings.\n",
 
-               email, qrbuf.QRname, qrbuf.QRname, token, qrbuf.QRname
+               email, qrbuf.QRname, webpage, qrbuf.QRname, token, qrbuf.QRname
        );
 
        quickie_message(
@@ -218,6 +219,7 @@ void cmd_subs(char *cmdbuf) {
        char email[SIZ];
        char subtype[SIZ];
        char token[SIZ];
+       char webpage[SIZ];
 
        extract(opr, cmdbuf, 0);
        if (!strcasecmp(opr, "subscribe")) {
@@ -229,7 +231,8 @@ void cmd_subs(char *cmdbuf) {
                else {
                        extract(room, cmdbuf, 1);
                        extract(email, cmdbuf, 2);
-                       do_subscribe(room, email, subtype);
+                       extract(webpage, cmdbuf, 3);
+                       do_subscribe(room, email, subtype, webpage);
                }
        }
        else if (!strcasecmp(opr, "unsubscribe")) {
index 02bc01a8416bf694d20db84f9bff4aa537defeb9..53990bda345d4180e380f208897d5a82c0df93fa 100644 (file)
@@ -48,7 +48,7 @@ data in the other direction.
  
   
  INSTRUCTION:  subpending
- SYNTAX:       subpending|friko@mumjiboolean.com|listrecp|A234Z|1234567890
+ SYNTAX:       subpending|friko@mumjiboolean.com|listrecp|A234Z|1234567890|http://foo.com/lists
     "Subscription pending" for the specified address.  This means that
 someone has requested to subscribe an e-mail address (in this case,
 friko@mumjiboolean.com) to the list.  The third parameter is either "list"
@@ -58,7 +58,10 @@ and e-mailed to the specified address.  When the user comes back and supplies
 this token, the subscription is complete.  The fifth parameter is a simple
 timestamp, so that we may purge old records which were never confirmed.
  
+ The sixth field is the URL of the web page used to enter the subscription
+request, minus any parameters.
  INSTRUCTION:  unsubpending
- SYNTAX:       unsubpending|friko@mumjiboolean.com|A234Z|1234567890
+ SYNTAX:       unsubpending|friko@mumjiboolean.com|A234Z|1234567890|http://foo.com/lists
     Similar to the 'subpending' command, except this one is for unsubscribe
-requests.  The same rules apply with regard to the token.
+requests.  The same rules apply with regard to the token and the web page.