1b260172eb3af0793b6268785febf303cff32395
[ircu2.10.12-pk.git] / include / ircd_features.h
1 #ifndef INCLUDED_features_h
2 #define INCLUDED_features_h
3 /*
4  * IRC - Internet Relay Chat, include/features.h
5  * Copyright (C) 2000 Kevin L. Mitchell <klmitch@mit.edu>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 /** @file
22  * @brief Public interfaces and declarations for dealing with configurable features.
23  * @version $Id: ircd_features.h 1774 2007-03-17 03:48:49Z klmitch $
24  */
25
26 struct Client;
27 struct StatDesc;
28
29 extern struct Client his;
30
31 /** Contains all feature settings for ircu.
32  * For documentation of each, see doc/readme.features.
33  */
34 enum Feature {
35   /* Misc. features */
36   FEAT_LOG,
37   FEAT_DOMAINNAME,
38   FEAT_RELIABLE_CLOCK,
39   FEAT_BUFFERPOOL,
40   FEAT_HAS_FERGUSON_FLUSHER,
41   FEAT_CLIENT_FLOOD,
42   FEAT_SERVER_PORT,
43   FEAT_NODEFAULTMOTD,
44   FEAT_MOTD_BANNER,
45   FEAT_PROVIDER,
46   FEAT_KILL_IPMISMATCH,
47   FEAT_IDLE_FROM_MSG,
48   FEAT_HUB,
49   FEAT_WALLOPS_OPER_ONLY,
50   FEAT_NODNS,
51   FEAT_RANDOM_SEED,
52   FEAT_DEFAULT_LIST_PARAM,
53   FEAT_NICKNAMEHISTORYLENGTH,
54   FEAT_HOST_HIDING,
55   FEAT_HIDDEN_HOST,
56   FEAT_HIDDEN_IP,
57   FEAT_CONNEXIT_NOTICES,
58   FEAT_OPLEVELS,
59   FEAT_ZANNELS,
60   FEAT_LOCAL_CHANNELS,
61   FEAT_TOPIC_BURST,
62   FEAT_AWAY_BURST,
63   FEAT_DISABLE_GLINES,
64   FEAT_FAKE_WEBIRC,
65   FEAT_WEBIRC_UMODE,
66   FEAT_WEBIRC_REJECT,
67   FEAT_LOC_ENABLE,
68   FEAT_LOC_TARGET,
69   FEAT_NOAMSG_TIME,
70   FEAT_NOAMSG_NUM,
71
72   /* friendly error messages */
73   FEAT_ERR_CHANNELISFULL,
74   FEAT_ERR_INVITEONLYCHAN,
75   FEAT_ERR_BANNEDFROMCHAN,
76   FEAT_ERR_BADCHANNELKEY,
77   FEAT_ERR_NEEDREGGEDNICK,
78   FEAT_ERR_SSLCHANNEL,
79   FEAT_ERR_JOINACCESS,
80   
81   /* features that probably should not be touched */
82   FEAT_KILLCHASETIMELIMIT,
83   FEAT_MAXCHANNELSPERUSER,
84   FEAT_NICKLEN,
85   FEAT_AVBANLEN,
86   FEAT_MAXBANS,
87   FEAT_MAXSILES,
88   FEAT_HANGONGOODLINK,
89   FEAT_HANGONRETRYDELAY,
90   FEAT_CONNECTTIMEOUT,
91   FEAT_MAXIMUM_LINKS,
92   FEAT_PINGFREQUENCY,
93   FEAT_CONNECTFREQUENCY,
94   FEAT_DEFAULTMAXSENDQLENGTH,
95   FEAT_GLINEMAXUSERCOUNT,
96   FEAT_SOCKSENDBUF,
97   FEAT_SOCKRECVBUF,
98   FEAT_IPCHECK_CLONE_LIMIT,
99   FEAT_IPCHECK_CLONE_PERIOD,
100   FEAT_IPCHECK_CLONE_DELAY,
101   FEAT_CHANNELLEN,
102
103   /* Some misc. default paths */
104   FEAT_MPATH,
105   FEAT_RPATH,
106   FEAT_PPATH,
107
108   /* Networking features */
109   FEAT_TOS_SERVER,
110   FEAT_TOS_CLIENT,
111   FEAT_POLLS_PER_LOOP,
112   FEAT_IRCD_RES_RETRIES,
113   FEAT_IRCD_RES_TIMEOUT,
114   FEAT_AUTH_TIMEOUT,
115   FEAT_ANNOUNCE_INVITES,
116
117   /* features that affect all operators */
118   FEAT_CONFIG_OPERCMDS,
119
120   /* HEAD_IN_SAND Features */
121   FEAT_HIS_SNOTICES,
122   FEAT_HIS_SNOTICES_OPER_ONLY,
123   FEAT_HIS_DEBUG_OPER_ONLY,
124   FEAT_HIS_WALLOPS,
125   FEAT_HIS_MAP,
126   FEAT_HIS_LINKS,
127   FEAT_HIS_TRACE,
128   FEAT_HIS_STATS_a,
129   FEAT_HIS_STATS_c,
130   FEAT_HIS_STATS_d,
131   FEAT_HIS_STATS_e,
132   FEAT_HIS_STATS_f,
133   FEAT_HIS_STATS_g,
134   FEAT_HIS_STATS_i,
135   FEAT_HIS_STATS_j,
136   FEAT_HIS_STATS_J,
137   FEAT_HIS_STATS_k,
138   FEAT_HIS_STATS_l,
139   FEAT_HIS_STATS_L,
140   FEAT_HIS_STATS_M,
141   FEAT_HIS_STATS_m,
142   FEAT_HIS_STATS_o,
143   FEAT_HIS_STATS_p,
144   FEAT_HIS_STATS_q,
145   FEAT_HIS_STATS_R,
146   FEAT_HIS_STATS_r,
147   FEAT_HIS_STATS_t,
148   FEAT_HIS_STATS_T,
149   FEAT_HIS_STATS_u,
150   FEAT_HIS_STATS_U,
151   FEAT_HIS_STATS_v,
152   FEAT_HIS_STATS_w,
153   FEAT_HIS_STATS_x,
154   FEAT_HIS_STATS_y,
155   FEAT_HIS_STATS_z,
156   FEAT_HIS_STATS_IAUTH,
157   FEAT_HIS_WHOIS_SERVERNAME,
158   FEAT_HIS_WHOIS_IDLETIME,
159   FEAT_HIS_WHOIS_LOCALCHAN,
160   FEAT_HIS_WHO_SERVERNAME,
161   FEAT_HIS_WHO_HOPCOUNT,
162   FEAT_HIS_MODEWHO,
163   FEAT_HIS_BANWHO,
164   FEAT_HIS_KILLWHO,
165   FEAT_HIS_REWRITE,
166   FEAT_HIS_REMOTE,
167   FEAT_HIS_NETSPLIT,
168   FEAT_HIS_SERVERNAME,
169   FEAT_HIS_SERVERINFO,
170   FEAT_HIS_URLSERVERS,
171
172   /* Misc. random stuff */
173   FEAT_NETWORK,
174   FEAT_URL_CLIENTS,
175   
176   FEAT_UNKNOWN_CMD_ENABLE,
177   FEAT_UNKNOWN_CMD_TARGET,
178   FEAT_CHMODE_A_ENABLE,
179   FEAT_CHMODE_A_TARGET,
180   FEAT_CHMODE_F_ENABLE,
181   
182   FEAT_HALFOP,
183   
184   FEAT_LAST_F
185 };
186
187 extern void feature_init(void);
188
189 extern int feature_set(struct Client* from, const char* const* fields,
190                        int count);
191 extern int feature_reset(struct Client* from, const char* const* fields,
192                          int count);
193 extern int feature_get(struct Client* from, const char* const* fields,
194                        int count);
195
196 extern void feature_unmark(void);
197 extern void feature_mark(void);
198
199 extern void feature_report(struct Client* to, const struct StatDesc* sd,
200                            char* param);
201
202 extern int feature_int(enum Feature feat);
203 extern int feature_bool(enum Feature feat);
204 extern const char *feature_str(enum Feature feat);
205
206 #endif /* INCLUDED_features_h */