-/*
- * List subscription handling
- */
-void do_listsub(void)
-{
- char cmd[SIZ];
- char room[SIZ];
- char token[SIZ];
- char email[SIZ];
- char subtype[SIZ];
-
- char buf[SIZ];
- int self;
- char sroom[SIZ];
-
- strcpy(WC->wc_username, "");
- strcpy(WC->wc_password, "");
- strcpy(WC->wc_roomname, "");
-
- wprintf("<HTML><HEAD><TITLE>List subscription</TITLE></HEAD><BODY>\n");
-
- strcpy(cmd, bstr("cmd"));
- strcpy(room, bstr("room"));
- strcpy(token, bstr("token"));
- strcpy(email, bstr("email"));
- strcpy(subtype, bstr("subtype"));
-
- wprintf("<CENTER>"
- "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>"
- "<FONT SIZE=+1 COLOR=\"FFFFFF\""
- "<B>List subscribe/unsubscribe</B>\n"
- "</TD></TR></TABLE><BR>\n"
- );
-
- /*
- * Subscribe command
- */
- if (!strcasecmp(cmd, "subscribe")) {
- serv_printf("SUBS subscribe|%s|%s|%s|%s/listsub",
- room,
- email,
- subtype,
- WC->http_host
- );
- serv_gets(buf);
- if (buf[0] == '2') {
- wprintf("<CENTER><H1>Confirmation request sent</H1>"
- "You are subscribing <TT>");
- escputs(email);
- wprintf("</TT> to 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 subscription. This extra step is for "
- "your protection, as it prevents others from "
- "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>\n"
- "<A HREF=\"/listsub\">Back...</A></CENTER>\n"
- );
- }
- else {
- wprintf("<FONT SIZE=+1><B>ERROR: %s</B>"
- "</FONT><BR><BR>\n",
- &buf[4]);
- goto FORM;
- }
+ Room = sbstr("room");
+ if (Room == NULL) {
+ ImpMsg = _("You need to specify the mailinglist to subscribe to.");
+ AppendImportantMessage(ImpMsg, -1);
+ return 0;
+ }
+ Email = sbstr("email");
+ if (Email == NULL) {
+ ImpMsg = _("You need to specify the email address you'd like to subscribe with.");
+ AppendImportantMessage(ImpMsg, -1);
+ return 0;