22bd4906049be3138d7a40ad06c84fe2d9e6e109
[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  * $Id$
22  */
23
24 struct Client;
25 struct StatDesc;
26
27 enum Feature {
28   /* Misc. features */
29   FEAT_LOG,
30   FEAT_DOMAINNAME,
31   FEAT_RELIABLE_CLOCK,
32   FEAT_BUFFERPOOL,
33   FEAT_HAS_FERGUSON_FLUSHER,
34   FEAT_CLIENT_FLOOD,
35   FEAT_SERVER_PORT,
36   FEAT_NODEFAULTMOTD,
37   FEAT_MOTD_BANNER,
38   FEAT_PROVIDER,
39   FEAT_KILL_IPMISMATCH,
40   FEAT_IDLE_FROM_MSG,
41   FEAT_HUB,
42   FEAT_WALLOPS_OPER_ONLY,
43   FEAT_NODNS,
44   FEAT_RANDOM_SEED,
45   FEAT_DEFAULT_LIST_PARAM,
46   FEAT_NICKNAMEHISTORYLENGTH,
47   FEAT_HOST_HIDING,
48   FEAT_HIDDEN_HOST,
49   FEAT_HIDDEN_IP,
50   FEAT_CONNEXIT_NOTICES,
51   FEAT_OPLEVELS,
52   FEAT_LOCAL_CHANNELS,
53   FEAT_TOPIC_BURST,
54
55   /* features that probably should not be touched */
56   FEAT_KILLCHASETIMELIMIT,
57   FEAT_MAXCHANNELSPERUSER,
58   FEAT_NICKLEN,
59   FEAT_AVBANLEN,
60   FEAT_MAXBANS,
61   FEAT_MAXSILES,
62   FEAT_HANGONGOODLINK,
63   FEAT_HANGONRETRYDELAY,
64   FEAT_CONNECTTIMEOUT,
65   FEAT_TIMESEC,
66   FEAT_MAXIMUM_LINKS,
67   FEAT_PINGFREQUENCY,
68   FEAT_CONNECTFREQUENCY,
69   FEAT_DEFAULTMAXSENDQLENGTH,
70   FEAT_GLINEMAXUSERCOUNT,
71
72   /* Some misc. default paths */
73   FEAT_MPATH,
74   FEAT_RPATH,
75   FEAT_PPATH,
76
77   /* Networking features */
78   FEAT_VIRTUAL_HOST,
79   FEAT_TOS_SERVER,
80   FEAT_TOS_CLIENT,
81   FEAT_POLLS_PER_LOOP,
82
83   /* features that affect all operators */
84   FEAT_CRYPT_OPER_PASSWORD,
85   FEAT_OPER_NO_CHAN_LIMIT,
86   FEAT_OPER_MODE_LCHAN,
87   FEAT_OPER_WALK_THROUGH_LMODES,
88   FEAT_NO_OPER_DEOP_LCHAN,
89   FEAT_SHOW_INVISIBLE_USERS,
90   FEAT_SHOW_ALL_INVISIBLE_USERS,
91   FEAT_UNLIMIT_OPER_QUERY,
92   FEAT_LOCAL_KILL_ONLY,
93   FEAT_CONFIG_OPERCMDS,
94   FEAT_LIST_CHAN,
95
96   /* features that affect global opers on this server */
97   FEAT_OPER_KILL,
98   FEAT_OPER_REHASH,
99   FEAT_OPER_RESTART,
100   FEAT_OPER_DIE,
101   FEAT_OPER_GLINE,
102   FEAT_OPER_LGLINE,
103   FEAT_OPER_JUPE,
104   FEAT_OPER_LJUPE,
105   FEAT_OPER_OPMODE,
106   FEAT_OPER_LOPMODE,
107   FEAT_OPER_FORCE_OPMODE,
108   FEAT_OPER_FORCE_LOPMODE,
109   FEAT_OPER_BADCHAN,
110   FEAT_OPER_LBADCHAN,
111   FEAT_OPER_SET,
112   FEAT_OPERS_SEE_IN_SECRET_CHANNELS,
113   FEAT_OPER_WIDE_GLINE,
114   FEAT_OPER_LIST_CHAN,
115
116   /* features that affect local opers on this server */
117   FEAT_LOCOP_KILL,
118   FEAT_LOCOP_REHASH,
119   FEAT_LOCOP_RESTART,
120   FEAT_LOCOP_DIE,
121   FEAT_LOCOP_LGLINE,
122   FEAT_LOCOP_LJUPE,
123   FEAT_LOCOP_LOPMODE,
124   FEAT_LOCOP_FORCE_LOPMODE,
125   FEAT_LOCOP_LBADCHAN,
126   FEAT_LOCOP_SET,
127   FEAT_LOCOP_SEE_IN_SECRET_CHANNELS,
128   FEAT_LOCOP_WIDE_GLINE,
129   FEAT_LOCOP_LIST_CHAN,
130
131   /* HEAD_IN_SAND Features */
132   FEAT_HIS_SNOTICES,
133   FEAT_HIS_SNOTICES_OPER_ONLY,
134   FEAT_HIS_DESYNCS,
135   FEAT_HIS_DEBUG_OPER_ONLY,
136   FEAT_HIS_WALLOPS,
137   FEAT_HIS_MAP,
138   FEAT_HIS_LINKS,
139   FEAT_HIS_TRACE,
140   FEAT_HIS_STATS_l,
141   FEAT_HIS_STATS_c,
142   FEAT_HIS_STATS_g,
143   FEAT_HIS_STATS_h,
144   FEAT_HIS_STATS_k,
145   FEAT_HIS_STATS_f,
146   FEAT_HIS_STATS_i,
147   FEAT_HIS_STATS_j,
148   FEAT_HIS_STATS_M,
149   FEAT_HIS_STATS_m,
150   FEAT_HIS_STATS_o,
151   FEAT_HIS_STATS_p,
152   FEAT_HIS_STATS_q,
153   FEAT_HIS_STATS_R,
154   FEAT_HIS_STATS_r,
155   FEAT_HIS_STATS_d,
156   FEAT_HIS_STATS_e,
157   FEAT_HIS_STATS_t,
158   FEAT_HIS_STATS_T,
159   FEAT_HIS_STATS_u,
160   FEAT_HIS_STATS_U,
161   FEAT_HIS_STATS_v,
162   FEAT_HIS_STATS_w,
163   FEAT_HIS_STATS_x,
164   FEAT_HIS_STATS_y,
165   FEAT_HIS_STATS_z,
166   FEAT_HIS_WHOIS_SERVERNAME,
167   FEAT_HIS_WHOIS_IDLETIME,
168   FEAT_HIS_WHO_SERVERNAME,
169   FEAT_HIS_WHO_HOPCOUNT,
170   FEAT_HIS_BANWHO,
171   FEAT_HIS_KILLWHO,
172   FEAT_HIS_REWRITE,
173   FEAT_HIS_REMOTE,
174   FEAT_HIS_NETSPLIT,
175   FEAT_HIS_SERVERNAME,
176   FEAT_HIS_SERVERINFO,
177   FEAT_HIS_URLSERVERS,
178
179   /* Misc. random stuff */
180   FEAT_NETWORK,
181   FEAT_URL_CLIENTS,
182
183   FEAT_LAST_F
184 };
185
186 extern void feature_init(void);
187
188 extern int feature_set(struct Client* from, const char* const* fields,
189                        int count);
190 extern int feature_reset(struct Client* from, const char* const* fields,
191                          int count);
192 extern int feature_get(struct Client* from, const char* const* fields,
193                        int count);
194
195 extern void feature_unmark(void);
196 extern void feature_mark(void);
197
198 extern void feature_report(struct Client* to, struct StatDesc* sd, int stat,
199                            char* param);
200
201 extern int feature_int(enum Feature feat);
202 extern int feature_bool(enum Feature feat);
203 extern const char *feature_str(enum Feature feat);
204
205 #endif /* INCLUDED_features_h */