1 /*
2  * ----------------------------------------------------------------
3  * ircproxy - Access Configuration Header
4  * ----------------------------------------------------------------
5  * Copyright (C) 1997-2009 Jonas Kvinge
6  *
7  * This file is part of ircproxy.
8  *
9  * ircproxy is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * ircproxy is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with ircproxy.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  * Additional permission under GNU GPL version 3 section 7
23  *
24  * If you modify ircproxy, or any covered work, by linking or
25  * combining it with openssl (or a modified version of that library),
26  * containing parts covered by the terms of the OpenSSL License and the
27  * SSLeay License, the licensors of ircproxy grant you additional
28  * permission to convey the resulting work.
29  *
30  * $Id: access_conf.h 54 2009-03-18 18:23:29Z jonasio $
31  *
32  */
33 
34 #ifdef ACCESS_CONF_H
35 #warning "access_conf.h already included."
36 #else
37 #define ACCESS_CONF_H
38 
39 #define ACCESS_ALLOW 1
40 #define ACCESS_DENY 2
41 
42 #define ACCESS_CONF_NOREASON				"No reason given."
43 #define ACCESS_CONF_USERFLOOD				"User flooding detected."
44 #define ACCESS_CONF_SENDQFLOOD				"Maximum allowed SendQ exceeded"
45 
46 /* STRUCTURES - JONAS (18.07.2001) */
47 
48 struct AccessConf_Struct {
49 
50   char *Host;
51   char *Reason;
52 
53   struct AccessConf_Struct *Prev;
54   struct AccessConf_Struct *Next;
55 
56 };
57 
58 /* FUNCTION PROTOTYPES - JONAS (18.07.2001) */
59 
60 signed long int access_conf_read(void);
61 struct AccessConf_Struct *access_conf_addallow(const char *const HostPT, const char *const ReasonPT);
62 void access_conf_remallow(struct AccessConf_Struct *AccessConf);
63 struct AccessConf_Struct *access_conf_adddeny(const char *const HostPT, const char *const ReasonPT);
64 void access_conf_remdeny(struct AccessConf_Struct *AccessConf);
65 void access_conf_destroy(void);
66 
67 #endif
68