$Log$
+Revision 323.61 2002/08/22 03:55:47 ajc
+* 'unsubscribe' command (but not 'confirm unsubscribe')
+
Revision 323.60 2002/08/21 21:58:37 ajc
* Completed self-service list subscription via web.
(Still need to implement unsubscribe.)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
*/
if (!strncasecmp(buf, "GET ", 4)) strcpy(buf, &buf[4]);
else if (!strncasecmp(buf, "HEAD ", 5)) strcpy(buf, &buf[5]);
+ else if (!strncasecmp(buf, "POST ", 5)) strcpy(buf, &buf[5]);
if (buf[1]==' ') buf[1]=0;
/*
"Web link for you to click on to confirm "
"your subscription. This extra step is for "
"your protection, as it prevents others from "
- "being able to subscribe you to lists.<BR><BR>"
+ "being able to subscribe you to lists "
+ "without your consent.<BR><BR>"
"Please click on the link which is being "
"e-mailed to you and your subscription will "
"be confirmed.<BR></CENTER>\n"
}
}
+ /*
+ * Unsubscribe command
+ */
+ else if (!strcasecmp(cmd, "unsubscribe")) {
+ serv_printf("SUBS unsubscribe|%s|%s|%s/listsub",
+ room,
+ email,
+ WC->http_host
+ );
+ serv_gets(buf);
+ if (buf[0] == '2') {
+ wprintf("<CENTER><H1>Confirmation request sent</H1>"
+ "You are unsubscribing <TT>");
+ escputs(email);
+ wprintf("</TT> from the "");
+ escputs(room);
+ wprintf("" mailing list. The listserver has "
+ "sent you an e-mail with one additional "
+ "Web link for you to click on to confirm "
+ "your unsubscription. This extra step is for "
+ "your protection, as it prevents others from "
+ "being able to unsubscribe you from "
+ "lists without your consent.<BR><BR>"
+ "Please click on the link which is being "
+ "e-mailed to you and your unsubscription will "
+ "be confirmed.<BR></CENTER>\n"
+ );
+ }
+ else {
+ wprintf("<FONT SIZE=+1><B>ERROR: %s</B>"
+ "</FONT><BR><BR>\n",
+ &buf[4]);
+ goto FORM;
+ }
+ }
+
/*
* Confirm command
*/