/*
* 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];
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);
}
"<%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(
char email[SIZ];
char subtype[SIZ];
char token[SIZ];
+ char webpage[SIZ];
extract(opr, cmdbuf, 0);
if (!strcasecmp(opr, "subscribe")) {
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")) {
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"
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.