c67582da088de6b3790abfc558b217e06d9a0a09
[citadel.git] / citadel / modules / listsub / serv_listsub.c
1 /*
2  * This module handles self-service subscription/unsubscription to mail lists.
3  *
4  * Copyright (c) 2002-2016 by the citadel.org team
5  *
6  * This program is open source software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 3.
8  *  
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  */
14
15 #include "sysdep.h"
16 #include <stdlib.h>
17 #include <unistd.h>
18 #include <stdio.h>
19 #include <fcntl.h>
20 #include <ctype.h>
21 #include <signal.h>
22 #include <pwd.h>
23 #include <errno.h>
24 #include <sys/types.h>
25 #include <dirent.h>
26 #include <time.h>
27 #include <sys/wait.h>
28 #include <string.h>
29 #include <limits.h>
30 #include <libcitadel.h>
31 #include "citadel.h"
32 #include "server.h"
33 #include "citserver.h"
34 #include "support.h"
35 #include "config.h"
36 #include "user_ops.h"
37 #include "database.h"
38 #include "msgbase.h"
39 #include "internet_addressing.h"
40 #include "clientsocket.h"
41 #include "ctdl_module.h"
42
43
44
45 // FIXME rewrite the subscribe-o-matic AJC 2021
46
47
48 /* 
49  * process subscribe/unsubscribe requests and confirmations
50  */
51 void cmd_subs(char *cmdbuf)
52 {
53         cprintf("%d Invalid command\n", ERROR + ILLEGAL_VALUE);
54 }
55
56
57 /*
58  * Module entry point
59  */
60 CTDL_MODULE_INIT(listsub)
61 {
62         if (!threading)
63         {
64                 CtdlRegisterProtoHook(cmd_subs, "SUBS", "List subscribe/unsubscribe");
65         }
66         
67         /* return our module name for the log */
68         return "listsub";
69 }