ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/conf.h
(Generate patch)

Comparing:
ircd-hybrid-7.2/include/s_conf.h (file contents), Revision 593 by michael, Fri May 12 05:47:32 2006 UTC vs.
ircd-hybrid/trunk/include/conf.h (file contents), Revision 1946 by michael, Sun May 5 10:21:40 2013 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  s_conf.h: A header for the configuration functions.
3 > *  conf.h: A header for the configuration functions.
4   *
5   *  Copyright (C) 2005 by the past and present ircd coders, and others.
6   *
# Line 24 | Line 24
24  
25   #ifndef INCLUDED_s_conf_h
26   #define INCLUDED_s_conf_h
27 < #include "setup.h"
28 < #ifdef HAVE_LIBCRYPTO
29 < #include <openssl/rsa.h>
30 < #endif
31 < #include "fileio.h"             /* FBFILE */
27 > #include "config.h"
28   #include "ircd_defs.h"
29   #include "motd.h"               /* MessageFile */
30   #include "client.h"
31   #include "hook.h"
32 < #include "pcre.h"
32 > #include "conf_class.h"
33  
38 – struct Client;
39 – struct DNSReply;
40 – struct hostent;
41 –
42 – extern FBFILE *conf_fbfile_in;
43 – extern struct Callback *client_check_cb;
44 –
45 – typedef enum
46 – {  
47 –  CONF_TYPE,
48 –  CLASS_TYPE,
49 –  OPER_TYPE,
50 –  CLIENT_TYPE,
51 –  SERVER_TYPE,
52 –  HUB_TYPE,
53 –  LEAF_TYPE,
54 –  KLINE_TYPE,
55 –  DLINE_TYPE,
56 –  EXEMPTDLINE_TYPE,
57 –  CLUSTER_TYPE,
58 –  RKLINE_TYPE,
59 –  RXLINE_TYPE,
60 –  XLINE_TYPE,    
61 –  ULINE_TYPE,
62 –  GLINE_TYPE,
63 –  CRESV_TYPE,    
64 –  NRESV_TYPE,
65 –  GDENY_TYPE
66 – } ConfType;
34  
35 < struct split_nuh_item
69 < {
70 <  dlink_node node;
71 <
72 <  char *nuhmask;
73 <  char *nickptr;
74 <  char *userptr;
75 <  char *hostptr;
76 <
77 <  size_t nicksize;
78 <  size_t usersize;
79 <  size_t hostsize;
80 < };
81 <
82 < struct ConfItem
83 < {
84 <  char *name;           /* Primary key */
85 <  pcre *regexpname;
86 <  dlink_node node;      /* link into known ConfItems of this type */
87 <  unsigned int flags;
88 <  ConfType type;
89 < };
90 <
91 < /*
92 < * MatchItem - used for XLINE and ULINE types
93 < */
94 < struct MatchItem
95 < {
96 <  char *user;           /* Used for ULINE only */
97 <  char *host;           /* Used for ULINE only */
98 <  char *reason;
99 <  char *oper_reason;
100 <  int action;           /* used for uline */
101 <  int count;            /* How many times this matchitem has been matched */
102 <  int ref_count;        /* How many times is this matchitem in use */
103 <  int illegal;          /* Should it be deleted when possible? */
104 <  time_t           hold;     /* Hold action until this time (calendar time) */
105 < };
106 <
107 < struct AccessItem
108 < {
109 <  dlink_node node;
110 <  unsigned int     status;   /* If CONF_ILLEGAL, delete when no clients */
111 <  unsigned int     flags;
112 <  unsigned int     modes;
113 <  int              clients;  /* Number of *LOCAL* clients using this */
114 <  struct irc_ssaddr my_ipnum; /* ip to bind to for outgoing connect */
115 <  struct irc_ssaddr ipnum;      /* ip to connect to */
116 <  char *           host;     /* host part of user@host */
117 <  char *           passwd;
118 <  char *           spasswd;  /* Password to send. */
119 <  char *           reason;
120 <  char *           oper_reason;
121 <  char *           user;     /* user part of user@host */
122 <  int              port;
123 <  char *           fakename;   /* Mask name */
124 <  time_t           hold;     /* Hold action until this time (calendar time) */
125 <  struct ConfItem *class_ptr;  /* Class of connection */
126 <  struct DNSQuery* dns_query;
127 <  int              aftype;
128 < #ifdef HAVE_LIBCRYPTO
129 <  char *           rsa_public_key_file;
130 <  RSA *            rsa_public_key;
131 <  struct EncCapability *cipher_preference;
132 < #endif
133 <  pcre *regexuser;
134 <  pcre *regexhost;
135 < };
136 <
137 < struct ClassItem
138 < {
139 <  long max_sendq;
140 <  int con_freq;
141 <  int ping_freq;
142 <  int ping_warning;
143 <  int max_total;
144 <  int max_local;
145 <  int max_global;
146 <  int max_ident;
147 <  int max_perip;
148 <  int curr_user_count;
149 <  int cidr_bitlen_ipv4;
150 <  int cidr_bitlen_ipv6;
151 <  int number_per_cidr;
152 <  dlink_list list_ipv4;         /* base of per cidr ipv4 client link list */
153 <  dlink_list list_ipv6;         /* base of per cidr ipv6 client link list */
154 < };
155 <
156 < struct CidrItem
157 < {
158 <  struct irc_ssaddr mask;
159 <  int number_on_this_cidr;
160 <  dlink_node node;
161 < };
162 <
163 < #define ConFreq(x)      ((x)->con_freq)
164 < #define PingFreq(x)     ((x)->ping_freq)
165 < #define PingWarning(x)  ((x)->ping_warning)
166 < #define MaxTotal(x)     ((x)->max_total)
167 < #define MaxGlobal(x)    ((x)->max_global)
168 < #define MaxLocal(x)     ((x)->max_local)
169 < #define MaxIdent(x)     ((x)->max_ident)
170 < #define MaxPerIp(x)     ((x)->max_perip)
171 < #define MaxSendq(x)     ((x)->max_sendq)
172 < #define CurrUserCount(x) ((x)->curr_user_count)
173 < #define CidrBitlenIPV4(x)       ((x)->cidr_bitlen_ipv4)
174 < #define CidrBitlenIPV6(x)       ((x)->cidr_bitlen_ipv6)
175 < #define NumberPerCidr(x) ((x)->number_per_cidr)
176 <
177 < #define ClassPtr(x)      ((x)->class_ptr)
178 <
179 <
180 < #define CONF_ILLEGAL            0x80000000
181 < #define CONF_RESERVED           0x00000001
182 < #define CONF_CLIENT             0x00000002
183 < #define CONF_SERVER             0x00000004
184 < #define CONF_OPERATOR           0x00000008
185 < #define CONF_KILL               0x00000010
186 < #define CONF_KLINE              CONF_KILL
187 < #define CONF_CLASS              0x00000020
188 < #define CONF_LEAF               0x00000040
189 < #define CONF_LISTEN_PORT        0x00000080
190 < #define CONF_HUB                0x00000100
191 < #define CONF_EXEMPTKLINE        0x00000200
192 < #define CONF_NOLIMIT            0x00000400
193 < #define CONF_DLINE              0x00000800
194 < #define CONF_XLINE              0x00001000
195 < #define CONF_ULINE              0x00002000
196 < #define CONF_EXEMPTDLINE        0x00004000
197 < #define CONF_GLINE              0x00008000
198 <
199 < #define CONF_SERVER_MASK       CONF_SERVER
200 < #define CONF_CLIENT_MASK       (CONF_CLIENT | CONF_OPERATOR | CONF_SERVER_MASK)
201 <
202 < /* XXX temporary hack */
203 < #define CONF_CRESV              0x80000001
204 < #define CONF_NRESV              0x80000002
205 <
206 < #define IsConfIllegal(x)        ((x)->status & CONF_ILLEGAL)
207 < #define SetConfIllegal(x)       ((x)->status |= CONF_ILLEGAL)
208 < #define IsConfServer(x)         ((x)->status == CONF_SERVER)
209 < #define SetConfServer(x)        ((x)->status = CONF_SERVER)
210 < #define IsConfOperator(x)       ((x)->status & CONF_OPERATOR)
211 < #define IsConfHub(x)            ((x)->status == CONF_HUB)
212 < #define SetConfHub(x)           ((x)->status = CONF_HUB)
213 < #define IsConfLeaf(x)           ((x)->status == CONF_LEAF)
214 < #define SetConfLeaf(x)          ((x)->status = CONF_LEAF)
215 < #define IsConfHubOrLeaf(x)      ((x)->status & (CONF_HUB|CONF_LEAF))
216 < #define IsConfKill(x)           ((x)->status == CONF_KILL)
217 < #define IsConfClient(x)         ((x)->status & CONF_CLIENT)
218 < #define IsConfTypeOfClient(x)   ((x)->status & CONF_CLIENT_MASK)
219 < #define IsConfUline(x)          ((x)->status & CONF_ULINE)
220 < #define IsConfXline(x)          ((x)->status & CONF_XLINE)
221 < #define IsConfGline(x)          ((x)->status == CONF_GLINE)
35 > #define CONF_NOREASON "<No reason supplied>"
36  
37 < /* AccessItem->flags */
37 > #define IsConfOperator(x)       ((x)->type == CONF_OPER)
38 > #define IsConfKill(x)           ((x)->type == CONF_KLINE)
39 > #define IsConfClient(x)         ((x)->type == CONF_CLIENT)
40 > #define IsConfGline(x)          ((x)->type == CONF_GLINE)
41  
42 < /* Generic flags... */
226 < /* access flags... */
42 > /* MaskItem->flags */
43   #define CONF_FLAGS_DO_IDENTD            0x00000001
44   #define CONF_FLAGS_LIMIT_IP             0x00000002
45   #define CONF_FLAGS_NO_TILDE             0x00000004
46   #define CONF_FLAGS_NEED_IDENTD          0x00000008
47 < /*                                      0x00000010 */
48 < #define CONF_FLAGS_NOMATCH_IP           0x00000020
49 < #define CONF_FLAGS_EXEMPTKLINE          0x00000040
50 < #define CONF_FLAGS_NOLIMIT              0x00000080
51 < #define CONF_FLAGS_IDLE_LINED           0x00000100
52 < #define CONF_FLAGS_SPOOF_IP             0x00000200
53 < #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
54 < #define CONF_FLAGS_REDIR                0x00000800
55 < #define CONF_FLAGS_EXEMPTGLINE          0x00001000
56 < #define CONF_FLAGS_RESTRICTED           0x00002000
57 < #define CONF_FLAGS_CAN_FLOOD            0x00100000
58 < #define CONF_FLAGS_NEED_PASSWORD        0x00200000
59 < /* server flags */
60 < #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00004000
61 < #define CONF_FLAGS_LAZY_LINK            0x00008000
246 < #define CONF_FLAGS_ENCRYPTED            0x00010000
247 < #define CONF_FLAGS_COMPRESSED           0x00020000
248 < #define CONF_FLAGS_TEMPORARY            0x00040000
249 < #define CONF_FLAGS_CRYPTLINK            0x00080000
250 < #define CONF_FLAGS_BURST_AWAY           0x00400000
251 < #define CONF_FLAGS_EXEMPTRESV           0x00800000
252 < #define CONF_FLAGS_TOPICBURST           0x01000000
47 > #define CONF_FLAGS_NOMATCH_IP           0x00000010
48 > #define CONF_FLAGS_EXEMPTKLINE          0x00000020
49 > #define CONF_FLAGS_NOLIMIT              0x00000040
50 > #define CONF_FLAGS_SPOOF_IP             0x00000080
51 > #define CONF_FLAGS_SPOOF_NOTICE         0x00000100
52 > #define CONF_FLAGS_REDIR                0x00000200
53 > #define CONF_FLAGS_EXEMPTGLINE          0x00000400
54 > #define CONF_FLAGS_CAN_FLOOD            0x00000800
55 > #define CONF_FLAGS_NEED_PASSWORD        0x00001000
56 > #define CONF_FLAGS_ALLOW_AUTO_CONN      0x00002000
57 > #define CONF_FLAGS_ENCRYPTED            0x00004000
58 > #define CONF_FLAGS_IN_DATABASE          0x00008000
59 > #define CONF_FLAGS_EXEMPTRESV           0x00010000
60 > #define CONF_FLAGS_SSL                  0x00020000
61 > #define CONF_FLAGS_WEBIRC               0x00040000
62  
63 < /* Macros for struct AccessItem */
63 > /* Macros for struct MaskItem */
64 > #define IsConfWebIRC(x)         ((x)->flags & CONF_FLAGS_WEBIRC)
65   #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
66   #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
67   #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
# Line 262 | Line 72 | struct CidrItem
72   #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
73   #define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
74   #define IsConfExemptResv(x)     ((x)->flags & CONF_FLAGS_EXEMPTRESV)
265 – #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
75   #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
76   #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
77   #define IsConfSpoofNotice(x)    ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
269 – #define IsConfRestricted(x)     ((x)->flags & CONF_FLAGS_RESTRICTED)
78   #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
79 < #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
80 < #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
273 < #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
274 < #define SetConfCompressed(x)    ((x)->flags |= CONF_FLAGS_COMPRESSED)
275 < #define ClearConfCompressed(x)  ((x)->flags &= ~CONF_FLAGS_COMPRESSED)
276 < #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
277 < #define SetConfCryptLink(x)     ((x)->flags |= CONF_FLAGS_CRYPTLINK)
278 < #define ClearConfCryptLink(x)   ((x)->flags &= ~CONF_FLAGS_CRYPTLINK)
279 < #define IsConfLazyLink(x)       ((x)->flags & CONF_FLAGS_LAZY_LINK)
280 < #define SetConfLazyLink(x)      ((x)->flags = CONF_FLAGS_LAZY_LINK)
281 < #define ClearConfLazyLink(x)    ((x)->flags &= ~CONF_FLAGS_LAZY_LINK)
79 > #define SetConfEncrypted(x)     ((x)->flags |= CONF_FLAGS_ENCRYPTED)
80 > #define ClearConfEncrypted(x)   ((x)->flags &= ~CONF_FLAGS_ENCRYPTED)
81   #define IsConfAllowAutoConn(x)  ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
82 < #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
82 > #define SetConfAllowAutoConn(x) ((x)->flags |= CONF_FLAGS_ALLOW_AUTO_CONN)
83   #define ClearConfAllowAutoConn(x) ((x)->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN)
285 – #define IsConfTemporary(x)      ((x)->flags & CONF_FLAGS_TEMPORARY)
286 – #define SetConfTemporary(x)     ((x)->flags |= CONF_FLAGS_TEMPORARY)
84   #define IsConfRedir(x)          ((x)->flags & CONF_FLAGS_REDIR)
85 < #define IsConfAwayBurst(x)      ((x)->flags & CONF_FLAGS_BURST_AWAY)
86 < #define SetConfAwayBurst(x)     ((x)->flags |= CONF_FLAGS_BURST_AWAY)
87 < #define ClearConfAwayBurst(x)   ((x)->flags &= ~CONF_FLAGS_BURST_AWAY)
88 < #define IsConfTopicBurst(x)     ((x)->flags & CONF_FLAGS_TOPICBURST)
89 < #define SetConfTopicBurst(x)    ((x)->flags |= CONF_FLAGS_TOPICBURST)
90 < #define ClearConfTopicBurst(x)  ((x)->flags &= ~CONF_FLAGS_TOPICBURST)
85 > #define IsConfSSL(x)      ((x)->flags & CONF_FLAGS_SSL)
86 > #define SetConfSSL(x)     ((x)->flags |= CONF_FLAGS_SSL)
87 > #define ClearConfSSL(x)   ((x)->flags &= ~CONF_FLAGS_SSL)
88 > #define IsConfDatabase(x)      ((x)->flags & CONF_FLAGS_IN_DATABASE)
89 > #define SetConfDatabase(x)     ((x)->flags |= CONF_FLAGS_IN_DATABASE)
90 >
91  
92   /* shared/cluster server entry types
93   * These defines are used for both shared and cluster.
94   */
95 < #define SHARED_KLINE            0x0001
96 < #define SHARED_TKLINE           0x0002
97 < #define SHARED_UNKLINE          0x0004
98 < #define SHARED_XLINE            0x0008
99 < #define SHARED_TXLINE           0x0010
100 < #define SHARED_UNXLINE          0x0020
101 < #define SHARED_RESV             0x0040
102 < #define SHARED_TRESV            0x0080
103 < #define SHARED_UNRESV           0x0100
104 < #define SHARED_LOCOPS           0x0200
105 < #define SHARED_ALL              (SHARED_KLINE | SHARED_TKLINE | SHARED_UNKLINE | \
106 <                                 SHARED_XLINE | SHARED_TXLINE | SHARED_UNXLINE | \
107 <                                 SHARED_RESV | SHARED_TRESV | SHARED_UNRESV |\
108 <                                 SHARED_LOCOPS)
109 <
110 < /* gline acl entry actions */
111 < #define GDENY_BLOCK             0x1
112 < #define GDENY_REJECT            0x2
95 > #define SHARED_KLINE            0x0001
96 > #define SHARED_UNKLINE          0x0002
97 > #define SHARED_XLINE            0x0004
98 > #define SHARED_UNXLINE          0x0008
99 > #define SHARED_RESV             0x0010
100 > #define SHARED_UNRESV           0x0020
101 > #define SHARED_LOCOPS           0x0040
102 > #define SHARED_DLINE            0x0080
103 > #define SHARED_UNDLINE          0x0100
104 > #define SHARED_ALL              (SHARED_KLINE | SHARED_UNKLINE |\
105 >                                 SHARED_XLINE | SHARED_UNXLINE |\
106 >                                 SHARED_RESV | SHARED_UNRESV |\
107 >                                 SHARED_LOCOPS | SHARED_DLINE | SHARED_UNDLINE)
108 >
109 >
110 > enum maskitem_type
111 > {
112 >  CONF_RESERVED = 1 <<  0, /* XXX */
113 >  CONF_CLIENT   = 1 <<  1,
114 >  CONF_SERVER   = 1 <<  2,
115 >  CONF_KLINE    = 1 <<  3,
116 >  CONF_DLINE    = 1 <<  4,
117 >  CONF_EXEMPT   = 1 <<  5,
118 >  CONF_CLUSTER  = 1 <<  6,
119 >  CONF_XLINE    = 1 <<  7,
120 >  CONF_ULINE    = 1 <<  8,
121 >  CONF_GLINE    = 1 <<  9,
122 >  CONF_CRESV    = 1 << 10,
123 >  CONF_NRESV    = 1 << 11,
124 >  CONF_SERVICE  = 1 << 12,
125 >  CONF_OPER     = 1 << 13,
126 >  CONF_HUB      = 1 << 14, /* XXX There are no separate hub/leaf configs anymore. This is just for /stats h */
127 >  CONF_CLASS    = 1 << 15  /* XXX Same here; just for /stats Y|y */
128 > };
129 >
130 > struct conf_parser_context
131 > {
132 >  unsigned int boot;
133 >  unsigned int pass;
134 >  FILE *conf_file;
135 > };
136 >
137 > struct split_nuh_item
138 > {
139 >  dlink_node node;
140 >
141 >  char *nuhmask;
142 >  char *nickptr;
143 >  char *userptr;
144 >  char *hostptr;
145 >
146 >  size_t nicksize;
147 >  size_t usersize;
148 >  size_t hostsize;
149 > };
150 >
151 > struct MaskItem
152 > {
153 >  dlink_node         node;
154 >  dlink_list         leaf_list;
155 >  dlink_list         hub_list;
156 >  dlink_list         exempt_list;
157 >  enum maskitem_type type;
158 >  unsigned int       dns_failed;
159 >  unsigned int       dns_pending;
160 >  unsigned int       flags;
161 >  unsigned int       modes;
162 >  unsigned int       port;
163 >  unsigned int       count;
164 >  unsigned int       aftype;
165 >  unsigned int       active;
166 >  unsigned int       htype;
167 >  unsigned int       ref_count;  /* Number of *LOCAL* clients using this */
168 >  int                bits;
169 >  time_t             until;     /* Hold action until this time (calendar time) */
170 >  time_t             setat;
171 >  struct irc_ssaddr  bind;  /* ip to bind to for outgoing connect */
172 >  struct irc_ssaddr  addr;  /* ip to connect to */
173 >  struct ClassItem  *class;  /* Class of connection */
174 >  char              *name;
175 >  char              *user;     /* user part of user@host */
176 >  char              *host;     /* host part of user@host */
177 >  char              *passwd;
178 >  char              *spasswd;  /* Password to send. */
179 >  char              *reason;
180 >  char              *cipher_list;
181 >  void              *rsa_public_key;
182 > };
183 >
184 > struct exempt
185 > {
186 >  dlink_node node;
187 >  char *name;
188 >  char *user;
189 >  char *host;
190 >  size_t len;
191 >  time_t when;
192 >  struct irc_ssaddr addr;
193 >  int bits;
194 >  int type;
195 >  int coid;
196 > };
197 >
198 > struct CidrItem
199 > {
200 >  dlink_node node;
201 >  struct irc_ssaddr mask;
202 >  unsigned int number_on_this_cidr;
203 > };
204  
205   struct config_file_entry
206   {
207    const char *dpath;          /* DPATH if set from command line */
208    const char *configfile;
209    const char *klinefile;
210 +  const char *glinefile;
211    const char *xlinefile;
323 –  const char *rxlinefile;
324 –  const char *rklinefile;
212    const char *dlinefile;
213 <  const char *glinefile;
327 <  const char *cresvfile;
328 <  const char *nresvfile;
329 <
330 <  char *logpath;
331 <  char *operlog;
213 >  const char *resvfile;
214  
333 –  char *servlink_path;
215    char *egdpool_path;
216 +  char *service_name;
217  
218    MessageFile motd;
337 –  MessageFile opermotd;
219    MessageFile linksfile;
220  
340 –  unsigned char compression_level;
221    int gline_min_cidr;
222    int gline_min_cidr6;
343 –  int dot_in_ip6_addr;
223    int dots_in_ident;
224    int failed_oper_notice;
225    int anti_spam_exit_message_time;
226 <  int max_accept;
226 >  unsigned int max_accept;
227 >  unsigned int max_watch;
228    int max_nick_time;
229 <  int max_nick_changes;
229 >  unsigned int max_nick_changes;
230    int ts_max_delta;
231    int ts_warn_delta;
232    int anti_nick_flood;
353 –  int kline_with_reason;
233    int warn_no_nline;
234    int invisible_on_connect;
235    int stats_e_disabled;
# Line 364 | Line 243 | struct config_file_entry
243    int oper_pass_resv;
244    int glines;
245    int hide_spoof_ips;
367 –  int burst_away;
368 –  int use_whois_actually;
246    int tkline_expire_notices;
247    int opers_bypass_callerid;
248    int ignore_bogus_ts;
372 –  char *kline_reason;
249    int pace_wait;
250    int pace_wait_simple;
251    int gline_time;
252 <  int gline_logging;
377 <  int idletime;
252 >  int gline_request_time;
253    int oper_only_umodes;
254    int oper_umodes;
255    int max_targets;
# Line 383 | Line 258 | struct config_file_entry
258    int min_nonwildcard_simple;
259    int kill_chase_time_limit;
260    int default_floodcount;
386 –  int client_flood;
261    /* 0 == don't use throttle... */
262    int throttle_time;
263    int use_egd;
264    int ping_cookie;
265    int disable_auth;
266    int disable_remote;
393 – #ifdef HAVE_LIBCRYPTO
394 –  struct EncCapability *default_cipher_preference;
395 – #endif
267   };
268  
269   struct config_channel_entry
270   {
271 <  int restrict_channels;
401 <  int disable_local_channels;
402 <  int use_except;
403 <  int use_invex;
404 <  int use_knock;
271 >  int disable_fake_channels;
272    int knock_delay;
273    int knock_delay_channel;
274    unsigned int max_bans;
275    unsigned int max_chans_per_user;
276 +  unsigned int max_chans_per_oper;
277    int no_create_on_split;
278    int no_join_on_split;
411 –  int quiet_on_ban;
412 –  int burst_topicwho;
279    int default_split_server_count;
280    int default_split_user_count;
281   };
282  
283   struct config_server_hide
284   {
285 +  char *hidden_name;
286    int flatten_links;
287    int hide_servers;
288 <  char *hidden_name;
288 >  int hide_services;
289    int links_delay;
290    int links_disabled;
291    int hidden;
425 –  int disable_hidden;
292    int hide_server_ips;
293   };
294  
295   struct server_info
296   {
297 +  char *sid;
298    char *name;
299    char *description;
300    char *network_name;
301    char *network_desc;
435 – #ifdef HAVE_LIBCRYPTO
302    char *rsa_private_key_file;
303 <  RSA *rsa_private_key;
304 <  SSL_CTX *ctx;
305 < #endif
440 <  char *sid;
303 >  void *rsa_private_key;
304 >  void *server_ctx;
305 >  void *client_ctx;
306    int hub;
307    struct irc_ssaddr ip;
308    struct irc_ssaddr ip6;
309 <  int max_clients;
309 >  unsigned int max_clients;
310 >  unsigned int max_nick_length;
311 >  unsigned int max_topic_length;
312    int specific_ipv4_vhost;
313    int specific_ipv6_vhost;
314    struct sockaddr_in dns_host;
# Line 458 | Line 325 | struct admin_info
325   struct logging_entry
326   {
327    unsigned int use_logging;
461 –  char operlog[PATH_MAX + 1];
462 –  char userlog[PATH_MAX + 1];
463 –  char glinelog[PATH_MAX + 1];
464 –  char ioerrlog[PATH_MAX + 1];
465 –  char klinelog[PATH_MAX + 1];
466 –  char killlog[PATH_MAX + 1];
467 –  char operspylog[PATH_MAX + 1];
468 –  char failed_operlog[PATH_MAX + 1];
328   };
329  
471 – extern int ypass;
472 – extern dlink_list class_items;
330   extern dlink_list server_items;
331   extern dlink_list cluster_items;
332 < extern dlink_list hub_items;
333 < extern dlink_list rxconf_items;
334 < extern dlink_list rkconf_items;
335 < extern dlink_list leaf_items;
336 < extern dlink_list temporary_klines;
480 < extern dlink_list temporary_dlines;
481 < extern dlink_list temporary_glines;
482 < extern dlink_list temporary_xlines;
483 < extern dlink_list temporary_rxlines;
484 < extern dlink_list temporary_rklines;
332 > extern dlink_list xconf_items;
333 > extern dlink_list uconf_items;
334 > extern dlink_list oconf_items;
335 > extern dlink_list service_items;
336 > extern struct conf_parser_context conf_parser_ctx;
337   extern struct logging_entry ConfigLoggingEntry;
338   extern struct config_file_entry ConfigFileEntry;/* defined in ircd.c*/
339   extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
# Line 491 | Line 343 | extern struct admin_info AdminInfo;
343   extern int valid_wild_card(struct Client *, int, int, ...);
344   /* End GLOBAL section */
345  
494 – extern unsigned long get_sendq(struct Client *);
495 – extern const char *get_client_class(struct Client *);
496 – extern int get_client_ping(struct Client *, int *);
497 – extern void check_class(void);
498 – extern void init_class(void);
499 – extern struct ConfItem *find_class(const char *);
346   extern void init_ip_hash_table(void);
347 < extern void count_ip_hash(int *, unsigned long *);
347 > extern void count_ip_hash(unsigned int *, uint64_t *);
348   extern void remove_one_ip(struct irc_ssaddr *);
349 < extern struct ConfItem *make_conf_item(ConfType type);
504 < extern void free_access_item(struct AccessItem *);
349 > extern struct MaskItem *conf_make(enum maskitem_type);
350   extern void read_conf_files(int);
351 < extern int attach_conf(struct Client *, struct ConfItem *);
351 > extern int attach_conf(struct Client *, struct MaskItem *);
352   extern int attach_connect_block(struct Client *, const char *, const char *);
353 + extern int check_client(struct Client *);
354  
509 – extern int detach_conf(struct Client *, ConfType);
355  
356 < extern struct ConfItem *find_conf_name(dlink_list *, const char *, ConfType);
357 < extern struct ConfItem *find_conf_exact(ConfType, const char *, const char *, const char *);
358 < extern struct AccessItem *find_kill(struct Client *);
359 < extern struct AccessItem *find_gline(struct Client *);
356 > extern void detach_conf(struct Client *, enum maskitem_type);
357 > extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
358 > extern struct MaskItem *find_kill(struct Client *);
359 > extern struct MaskItem *find_gline(struct Client *);
360   extern int conf_connect_allowed(struct irc_ssaddr *, int);
361   extern char *oper_privs_as_string(const unsigned int);
362   extern void split_nuh(struct split_nuh_item *);
363 < extern struct ConfItem *find_matching_name_conf(ConfType, const char *,
364 <                                                const char *, const char *, int);
365 < extern struct ConfItem *find_exact_name_conf(ConfType, const char *,
363 > extern struct MaskItem *find_matching_name_conf(enum maskitem_type, const char *,
364 >                                                const char *, const char *, unsigned int);
365 > extern struct MaskItem *find_exact_name_conf(enum maskitem_type, const struct Client *, const char *,
366                                               const char *, const char *);
367 < extern void delete_conf_item(struct ConfItem *);
523 < extern void report_confitem_types(struct Client *, ConfType, int);
367 > extern void conf_free(struct MaskItem *);
368   extern void yyerror(const char *);
369 < extern int conf_yy_fatal_error(const char *);
526 < extern int conf_fbgets(char *, unsigned int, FBFILE *);
527 < extern void write_conf_line(struct Client *, struct ConfItem *,
528 <                            const char *, time_t);
529 < extern int remove_conf_line(ConfType, struct Client *, const char *,
530 <                            const char *);
531 < extern void add_temp_line(struct ConfItem *);
369 > extern void conf_error_report(const char *);
370   extern void cleanup_tklines(void *);
533 – extern const char *get_conf_name(ConfType);
371   extern int rehash(int);
372 < extern int conf_add_server(struct ConfItem *, const char *);
373 < extern void conf_add_class_to_conf(struct ConfItem *, const char *);
537 < extern void conf_add_d_conf(struct AccessItem *);
372 > extern void lookup_confhost(struct MaskItem *);
373 > extern void conf_add_class_to_conf(struct MaskItem *, const char *);
374  
375 < /* XXX consider moving these into csvlib.h */
540 < extern void parse_csv_file(FBFILE *, ConfType);
375 > extern const char *get_oper_name(const struct Client *);
376  
542 – extern char *get_oper_name(const struct Client *);
543 –
544 – extern void *map_to_conf(struct ConfItem *);
545 – extern struct ConfItem *unmap_conf_item(void *);
377   /* XXX should the parse_aline stuff go into another file ?? */
378   #define AWILD 0x1               /* check wild cards */
548 – #define NOUSERLOOKUP 0x2 /* Don't lookup the user@host on /rkline nick */
379   extern int parse_aline(const char *, struct Client *, int, char **,
380                         int, char **, char **, time_t *, char **, char **);
381   extern int valid_comment(struct Client *, char *, int);
382  
553 – /* XXX */
554 – extern int yylex(void);
383  
384   #define TK_SECONDS 0
385   #define TK_MINUTES 1
386 < extern time_t valid_tkline(char *, int);
387 < extern int match_conf_password(const char *, const struct AccessItem *);
386 > extern time_t valid_tkline(const char *, int);
387 > extern int match_conf_password(const char *, const struct MaskItem *);
388  
389   #define NOT_AUTHORIZED    (-1)
390 < #define IRCD_SOCKET_ERROR (-2)
391 < #define I_LINE_FULL       (-3)
392 < #define TOO_MANY          (-4)
393 < #define BANNED_CLIENT     (-5)
566 < #define TOO_FAST          (-6)
390 > #define I_LINE_FULL       (-2)
391 > #define TOO_MANY          (-3)
392 > #define BANNED_CLIENT     (-4)
393 > #define TOO_FAST          (-5)
394  
395   #define CLEANUP_TKLINES_TIME 60
396  
397   extern void cluster_a_line(struct Client *,
398                             const char *, int, int, const char *,...);
572 – extern void rebuild_cidr_class(struct ConfItem *, struct ClassItem *);
573 –
399   #endif /* INCLUDED_s_conf_h */

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)