Author: Kev <klmitch@mit.edu>
[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
26 enum Feature {
27   /* Misc. features */
28   FEAT_LOG,
29   FEAT_DOMAINNAME,
30   FEAT_RELIABLE_CLOCK,
31   FEAT_BUFFERPOOL,
32   FEAT_HAS_FERGUSON_FLUSHER,
33   FEAT_CLIENT_FLOOD,
34   FEAT_SERVER_PORT,
35   FEAT_NODEFAULTMOTD,
36   FEAT_KILL_IPMISMATCH,
37   FEAT_IDLE_FROM_MSG,
38   FEAT_HUB,
39   FEAT_WALLOPS_OPER_ONLY,
40   FEAT_NODNS,
41   FEAT_RANDOM_SEED,
42   FEAT_DEFAULT_LIST_PARAM,
43   FEAT_NICKNAMEHISTORYLENGTH,
44
45   /* features that probably should not be touched */
46   FEAT_KILLCHASETIMELIMIT,
47   FEAT_MAXCHANNELSPERUSER,
48   FEAT_AVBANLEN,
49   FEAT_MAXBANS,
50   FEAT_MAXSILES,
51   FEAT_HANGONGOODLINK,
52   FEAT_HANGONRETRYDELAY,
53   FEAT_CONNECTTIMEOUT,
54   FEAT_TIMESEC,
55   FEAT_MAXIMUM_LINKS,
56   FEAT_PINGFREQUENCY,
57   FEAT_CONNECTFREQUENCY,
58   FEAT_DEFAULTMAXSENDQLENGTH,
59   FEAT_GLINEMAXUSERCOUNT,
60
61   /* Some misc. default paths */
62   FEAT_MPATH,
63   FEAT_RPATH,
64   FEAT_PPATH,
65
66   /* Networking features */
67   FEAT_VIRTUAL_HOST,
68   FEAT_TOS_SERVER,
69   FEAT_TOS_CLIENT,
70
71   /* features that affect all operators */
72   FEAT_CRYPT_OPER_PASSWORD,
73   FEAT_OPER_NO_CHAN_LIMIT,
74   FEAT_OPER_MODE_LCHAN,
75   FEAT_OPER_WALK_THROUGH_LMODES,
76   FEAT_NO_OPER_DEOP_LCHAN,
77   FEAT_SHOW_INVISIBLE_USERS,
78   FEAT_SHOW_ALL_INVISIBLE_USERS,
79   FEAT_UNLIMIT_OPER_QUERY,
80   FEAT_LOCAL_KILL_ONLY,
81   FEAT_CONFIG_OPERCMDS,
82
83   /* features that affect global opers on this server */
84   FEAT_OPER_KILL,
85   FEAT_OPER_REHASH,
86   FEAT_OPER_RESTART,
87   FEAT_OPER_DIE,
88   FEAT_OPER_GLINE,
89   FEAT_OPER_LGLINE,
90   FEAT_OPER_JUPE,
91   FEAT_OPER_LJUPE,
92   FEAT_OPER_OPMODE,
93   FEAT_OPER_LOPMODE,
94   FEAT_OPER_BADCHAN,
95   FEAT_OPER_LBADCHAN,
96   FEAT_OPER_SET,
97   FEAT_OPERS_SEE_IN_SECRET_CHANNELS,
98   FEAT_OPER_WIDE_GLINE,
99
100   /* features that affect local opers on this server */
101   FEAT_LOCOP_KILL,
102   FEAT_LOCOP_REHASH,
103   FEAT_LOCOP_RESTART,
104   FEAT_LOCOP_DIE,
105   FEAT_LOCOP_LGLINE,
106   FEAT_LOCOP_LJUPE,
107   FEAT_LOCOP_LOPMODE,
108   FEAT_LOCOP_LBADCHAN,
109   FEAT_LOCOP_SET,
110   FEAT_LOCOP_SEE_IN_SECRET_CHANNELS,
111   FEAT_LOCOP_WIDE_GLINE,
112
113   FEAT_LAST_F
114 };
115
116 extern void feature_init(void);
117
118 extern int feature_set(struct Client* from, const char* const* fields,
119                        int count);
120 extern int feature_reset(struct Client* from, const char* const* fields,
121                          int count);
122 extern int feature_get(struct Client* from, const char* const* fields,
123                        int count);
124
125 extern void feature_unmark(void);
126 extern void feature_mark(void);
127
128 extern void feature_report(struct Client* to);
129
130 extern int feature_int(enum Feature feat);
131 extern int feature_bool(enum Feature feat);
132 extern const char *feature_str(enum Feature feat);
133
134 #endif /* INCLUDED_features_h */