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