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
43   /* features that probably should not be touched */
44   FEAT_KILLCHASETIMELIMIT,
45   FEAT_MAXCHANNELSPERUSER,
46   FEAT_AVBANLEN,
47   FEAT_MAXBANS,
48   FEAT_MAXSILES,
49   FEAT_HANGONGOODLINK,
50   FEAT_HANGONRETRYDELAY,
51   FEAT_CONNECTTIMEOUT,
52   FEAT_TIMESEC,
53   FEAT_MAXIMUM_LINKS,
54   FEAT_PINGFREQUENCY,
55   FEAT_CONNECTFREQUENCY,
56   FEAT_DEFAULTMAXSENDQLENGTH,
57
58   /* Some misc. default paths */
59   FEAT_MPATH,
60   FEAT_RPATH,
61   FEAT_PPATH,
62
63   /* Networking features */
64   FEAT_VIRTUAL_HOST,
65   FEAT_TOS_SERVER,
66   FEAT_TOS_CLIENT,
67
68   /* features that affect all operators */
69   FEAT_CRYPT_OPER_PASSWORD,
70   FEAT_OPER_NO_CHAN_LIMIT,
71   FEAT_OPER_MODE_LCHAN,
72   FEAT_OPER_WALK_THROUGH_LMODES,
73   FEAT_NO_OPER_DEOP_LCHAN,
74   FEAT_SHOW_INVISIBLE_USERS,
75   FEAT_SHOW_ALL_INVISIBLE_USERS,
76   FEAT_UNLIMIT_OPER_QUERY,
77   FEAT_LOCAL_KILL_ONLY,
78   FEAT_CONFIG_OPERCMDS,
79
80   /* features that affect global opers on this server */
81   FEAT_OPER_KILL,
82   FEAT_OPER_REHASH,
83   FEAT_OPER_RESTART,
84   FEAT_OPER_DIE,
85   FEAT_OPER_GLINE,
86   FEAT_OPER_LGLINE,
87   FEAT_OPER_JUPE,
88   FEAT_OPER_LJUPE,
89   FEAT_OPER_OPMODE,
90   FEAT_OPER_LOPMODE,
91   FEAT_OPER_BADCHAN,
92   FEAT_OPER_LBADCHAN,
93   FEAT_OPER_SET,
94   FEAT_OPERS_SEE_IN_SECRET_CHANNELS,
95
96   /* features that affect local opers on this server */
97   FEAT_LOCOP_KILL,
98   FEAT_LOCOP_REHASH,
99   FEAT_LOCOP_RESTART,
100   FEAT_LOCOP_DIE,
101   FEAT_LOCOP_LGLINE,
102   FEAT_LOCOP_LJUPE,
103   FEAT_LOCOP_LOPMODE,
104   FEAT_LOCOP_LBADCHAN,
105   FEAT_LOCOP_SET,
106   FEAT_LOCOP_SEE_IN_SECRET_CHANNELS,
107
108   FEAT_LAST_F
109 };
110
111 extern int feature_set(struct Client* from, const char* const* fields,
112                        int count);
113 extern int feature_reset(struct Client* from, const char* const* fields,
114                          int count);
115 extern int feature_get(struct Client* from, const char* const* fields,
116                        int count);
117
118 extern void feature_unmark(void);
119 extern void feature_mark(void);
120
121 extern void feature_report(struct Client* to);
122
123 extern int feature_int(enum Feature feat);
124 extern int feature_bool(enum Feature feat);
125 extern const char *feature_str(enum Feature feat);
126
127 #endif /* INCLUDED_features_h */