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

Comparing ircd-hybrid/trunk/src/conf_parser.y (file contents):
Revision 2336 by michael, Wed Jul 3 12:58:28 2013 UTC vs.
Revision 6375 by michael, Fri Aug 21 10:34:16 2015 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  conf_parser.y: Parses the ircd configuration file.
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 2005 by the past and present ircd coders, and others.
4 > *  Copyright (c) 2000-2015 ircd-hybrid development team
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 16 | Line 15
15   *
16   *  You should have received a copy of the GNU General Public License
17   *  along with this program; if not, write to the Free Software
18 < *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
18 > *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19   *  USA
21 *
22 *  $Id$
20   */
21  
22 + /*! \file conf_parser.y
23 + * \brief Parses the ircd configuration file.
24 + * \version $Id$
25 + */
26 +
27 +
28   %{
29  
27 #define YY_NO_UNPUT
30   #include <sys/types.h>
31   #include <string.h>
32  
# Line 34 | Line 36
36   #include "list.h"
37   #include "conf.h"
38   #include "conf_class.h"
39 + #include "conf_pseudo.h"
40   #include "event.h"
41 + #include "id.h"
42   #include "log.h"
43 < #include "client.h"     /* for UMODE_ALL only */
43 > #include "client.h"     /* for UMODE_SERVNOTICE only */
44   #include "irc_string.h"
45   #include "memory.h"
46   #include "modules.h"
47 < #include "s_serv.h"
47 > #include "server.h"
48   #include "hostmask.h"
49   #include "send.h"
50   #include "listener.h"
51   #include "resv.h"
52   #include "numeric.h"
53 < #include "s_user.h"
53 > #include "user.h"
54   #include "motd.h"
55  
56   #ifdef HAVE_LIBCRYPTO
# Line 62 | Line 66 | int yylex(void);
66  
67   static struct
68   {
69 <  struct {
69 >  struct
70 >  {
71      dlink_list list;
72    } mask,
73      leaf,
74      hub;
75  
76 <  struct {
76 >  struct
77 >  {
78      char buf[IRCD_BUFSIZE];
79    } name,
80 +    nick,
81      user,
82      host,
83      addr,
# Line 80 | Line 87 | static struct
87      cert,
88      rpass,
89      spass,
90 <    class;
90 >    whois,
91 >    class,
92 >    target,
93 >    prepend,
94 >    command;
95  
96 <  struct {
96 >  struct
97 >  {
98      unsigned int value;
99    } flags,
100      modes,
# Line 101 | Line 113 | static struct
113      max_ident,
114      max_sendq,
115      max_recvq,
116 +    max_channels,
117      cidr_bitlen_ipv4,
118      cidr_bitlen_ipv6,
119      number_per_cidr;
# Line 109 | Line 122 | static struct
122   static void
123   reset_block_state(void)
124   {
125 <  dlink_node *ptr = NULL, *ptr_next = NULL;
125 >  dlink_node *node = NULL, *node_next = NULL;
126  
127 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.mask.list.head)
127 >  DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head)
128    {
129 <    MyFree(ptr->data);
130 <    dlinkDelete(ptr, &block_state.mask.list);
131 <    free_dlink_node(ptr);
129 >    MyFree(node->data);
130 >    dlinkDelete(node, &block_state.mask.list);
131 >    free_dlink_node(node);
132    }
133  
134 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.leaf.list.head)
134 >  DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head)
135    {
136 <    MyFree(ptr->data);
137 <    dlinkDelete(ptr, &block_state.leaf.list);
138 <    free_dlink_node(ptr);
136 >    MyFree(node->data);
137 >    dlinkDelete(node, &block_state.leaf.list);
138 >    free_dlink_node(node);
139    }
140  
141 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.hub.list.head)
141 >  DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head)
142    {
143 <    MyFree(ptr->data);
144 <    dlinkDelete(ptr, &block_state.hub.list);
145 <    free_dlink_node(ptr);
143 >    MyFree(node->data);
144 >    dlinkDelete(node, &block_state.hub.list);
145 >    free_dlink_node(node);
146    }
147  
148    memset(&block_state, 0, sizeof(block_state));
# Line 148 | Line 161 | reset_block_state(void)
161   %token  ANTI_NICK_FLOOD
162   %token  ANTI_SPAM_EXIT_MESSAGE_TIME
163   %token  AUTOCONN
164 + %token  AWAY_COUNT
165 + %token  AWAY_TIME
166   %token  BYTES KBYTES MBYTES
167   %token  CALLER_ID_WAIT
168   %token  CAN_FLOOD
# Line 159 | Line 174 | reset_block_state(void)
174   %token  CONNECTFREQ
175   %token  CYCLE_ON_HOST_CHANGE
176   %token  DEFAULT_FLOODCOUNT
177 < %token  DEFAULT_SPLIT_SERVER_COUNT
178 < %token  DEFAULT_SPLIT_USER_COUNT
177 > %token  DEFAULT_JOIN_FLOOD_COUNT
178 > %token  DEFAULT_JOIN_FLOOD_TIME
179 > %token  DEFAULT_MAX_CLIENTS
180   %token  DENY
181   %token  DESCRIPTION
182   %token  DIE
183   %token  DISABLE_AUTH
184   %token  DISABLE_FAKE_CHANNELS
185   %token  DISABLE_REMOTE_COMMANDS
186 + %token  DLINE_MIN_CIDR
187 + %token  DLINE_MIN_CIDR6
188   %token  DOTS_IN_IDENT
171 %token  EGDPOOL_PATH
189   %token  EMAIL
190   %token  ENCRYPTED
191   %token  EXCEED_LIMIT
# Line 177 | Line 194 | reset_block_state(void)
194   %token  FLATTEN_LINKS
195   %token  GECOS
196   %token  GENERAL
180 %token  GLINE
181 %token  GLINE_DURATION
182 %token  GLINE_ENABLE
183 %token  GLINE_EXEMPT
184 %token  GLINE_MIN_CIDR
185 %token  GLINE_MIN_CIDR6
186 %token  GLINE_REQUEST_DURATION
187 %token  GLOBAL_KILL
188 %token  HAVENT_READ_CONF
197   %token  HIDDEN
198   %token  HIDDEN_NAME
199 + %token  HIDE_CHANS
200 + %token  HIDE_IDLE
201   %token  HIDE_IDLE_FROM_OPERS
202   %token  HIDE_SERVER_IPS
203   %token  HIDE_SERVERS
204   %token  HIDE_SERVICES
195 %token  HIDE_SPOOF_IPS
205   %token  HOST
206   %token  HUB
207   %token  HUB_MASK
208   %token  IGNORE_BOGUS_TS
209   %token  INVISIBLE_ON_CONNECT
210 + %token  INVITE_CLIENT_COUNT
211 + %token  INVITE_CLIENT_TIME
212   %token  IP
213   %token  IRCD_AUTH
214   %token  IRCD_FLAGS
215   %token  IRCD_SID
205 %token  JOIN_FLOOD_COUNT
206 %token  JOIN_FLOOD_TIME
216   %token  KILL
217   %token  KILL_CHASE_TIME_LIMIT
218   %token  KLINE
219   %token  KLINE_EXEMPT
220 < %token  KNOCK_DELAY
220 > %token  KLINE_MIN_CIDR
221 > %token  KLINE_MIN_CIDR6
222 > %token  KNOCK_CLIENT_COUNT
223 > %token  KNOCK_CLIENT_TIME
224   %token  KNOCK_DELAY_CHANNEL
225   %token  LEAF_MASK
226   %token  LINKS_DELAY
# Line 216 | Line 228 | reset_block_state(void)
228   %token  MASK
229   %token  MAX_ACCEPT
230   %token  MAX_BANS
231 < %token  MAX_CHANS_PER_OPER
220 < %token  MAX_CHANS_PER_USER
231 > %token  MAX_CHANNELS
232   %token  MAX_GLOBAL
233   %token  MAX_IDENT
234   %token  MAX_IDLE
# Line 241 | Line 252 | reset_block_state(void)
252   %token  NETWORK_DESC
253   %token  NETWORK_NAME
254   %token  NICK
244 %token  NO_CREATE_ON_SPLIT
245 %token  NO_JOIN_ON_SPLIT
255   %token  NO_OPER_FLOOD
256   %token  NO_TILDE
257   %token  NUMBER
# Line 284 | Line 293 | reset_block_state(void)
293   %token  SSL_CERTIFICATE_FILE
294   %token  SSL_CERTIFICATE_FINGERPRINT
295   %token  SSL_CONNECTION_REQUIRED
296 + %token  SSL_DH_ELLIPTIC_CURVE
297   %token  SSL_DH_PARAM_FILE
298 + %token  SSL_MESSAGE_DIGEST_ALGORITHM
299   %token  STATS_E_DISABLED
300   %token  STATS_I_OPER_ONLY
301   %token  STATS_K_OPER_ONLY
302 + %token  STATS_M_OPER_ONLY
303   %token  STATS_O_OPER_ONLY
304   %token  STATS_P_OPER_ONLY
305   %token  STATS_U_OPER_ONLY
# Line 295 | Line 307 | reset_block_state(void)
307   %token  T_BOTS
308   %token  T_CALLERID
309   %token  T_CCONN
310 + %token  T_COMMAND
311   %token  T_CLUSTER
312   %token  T_DEAF
313   %token  T_DEBUG
# Line 309 | Line 322 | reset_block_state(void)
322   %token  T_IPV6
323   %token  T_LOCOPS
324   %token  T_LOG
312 %token  T_MAX_CLIENTS
325   %token  T_NCHANGE
326   %token  T_NONONREG
327 < %token  T_OPERWALL
327 > %token  T_OPME
328 > %token  T_PREPEND
329 > %token  T_PSEUDO
330   %token  T_RECVQ
331   %token  T_REJ
332   %token  T_RESTART
333   %token  T_SERVER
334   %token  T_SERVICE
321 %token  T_SERVICES_NAME
335   %token  T_SERVNOTICE
336   %token  T_SET
337   %token  T_SHARED
# Line 328 | Line 341 | reset_block_state(void)
341   %token  T_SPY
342   %token  T_SSL
343   %token  T_SSL_CIPHER_LIST
344 < %token  T_SSL_CLIENT_METHOD
332 < %token  T_SSL_SERVER_METHOD
333 < %token  T_SSLV3
334 < %token  T_TLSV1
344 > %token  T_TARGET
345   %token  T_UMODES
346   %token  T_UNAUTH
347   %token  T_UNDLINE
# Line 342 | Line 352 | reset_block_state(void)
352   %token  T_WALLOPS
353   %token  T_WEBIRC
354   %token  TBOOL
355 + %token  THROTTLE_COUNT
356   %token  THROTTLE_TIME
357   %token  TKLINE_EXPIRE_NOTICES
358   %token  TMASKED
348 %token  TRUE_NO_OPER_FLOOD
359   %token  TS_MAX_DELTA
360   %token  TS_WARN_DELTA
361   %token  TWODOTS
362   %token  TYPE
363   %token  UNKLINE
354 %token  USE_EGD
364   %token  USE_LOGGING
365   %token  USER
366   %token  VHOST
367   %token  VHOST6
368 < %token  WARN_NO_NLINE
368 > %token  WARN_NO_CONNECT_BLOCK
369 > %token  WHOIS
370   %token  XLINE
371 + %token  XLINE_EXEMPT
372  
373   %type  <string> QSTRING
374   %type  <number> NUMBER
# Line 367 | Line 378 | reset_block_state(void)
378   %type  <number> sizespec_
379  
380   %%
381 < conf:  
381 > conf:
382          | conf conf_item
383          ;
384  
385   conf_item:        admin_entry
386                  | logging_entry
387                  | oper_entry
388 <                | channel_entry
389 <                | class_entry
388 >                | channel_entry
389 >                | class_entry
390                  | listen_entry
391                  | auth_entry
392                  | serverinfo_entry
393 <                | serverhide_entry
393 >                | serverhide_entry
394                  | resv_entry
395                  | service_entry
396                  | shared_entry
397 <                | cluster_entry
397 >                | cluster_entry
398                  | connect_entry
399                  | kill_entry
400                  | deny_entry
401 <                | exempt_entry
402 <                | general_entry
401 >                | exempt_entry
402 >                | general_entry
403                  | gecos_entry
404                  | modules_entry
405                  | motd_entry
406 +                | pseudo_entry
407                  | error ';'
408                  | error '}'
409          ;
410  
411  
412   timespec_: { $$ = 0; } | timespec;
413 < timespec:       NUMBER timespec_
414 <                {
415 <                        $$ = $1 + $2;
416 <                }
417 <                | NUMBER SECONDS timespec_
418 <                {
419 <                        $$ = $1 + $3;
420 <                }
421 <                | NUMBER MINUTES timespec_
422 <                {
423 <                        $$ = $1 * 60 + $3;
424 <                }
425 <                | NUMBER HOURS timespec_
426 <                {
427 <                        $$ = $1 * 60 * 60 + $3;
428 <                }
417 <                | NUMBER DAYS timespec_
418 <                {
419 <                        $$ = $1 * 60 * 60 * 24 + $3;
420 <                }
421 <                | NUMBER WEEKS timespec_
422 <                {
423 <                        $$ = $1 * 60 * 60 * 24 * 7 + $3;
424 <                }
425 <                | NUMBER MONTHS timespec_
426 <                {
427 <                        $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3;
428 <                }
429 <                | NUMBER YEARS timespec_
430 <                {
431 <                        $$ = $1 * 60 * 60 * 24 * 365 + $3;
432 <                }
433 <                ;
434 <
435 < sizespec_:      { $$ = 0; } | sizespec;
436 < sizespec:       NUMBER sizespec_ { $$ = $1 + $2; }
437 <                | NUMBER BYTES sizespec_ { $$ = $1 + $3; }
438 <                | NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; }
439 <                | NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
440 <                ;
413 > timespec:  NUMBER timespec_         { $$ = $1 + $2; } |
414 >           NUMBER SECONDS timespec_ { $$ = $1 + $3; } |
415 >           NUMBER MINUTES timespec_ { $$ = $1 * 60 + $3; } |
416 >           NUMBER HOURS timespec_   { $$ = $1 * 60 * 60 + $3; } |
417 >           NUMBER DAYS timespec_    { $$ = $1 * 60 * 60 * 24 + $3; } |
418 >           NUMBER WEEKS timespec_   { $$ = $1 * 60 * 60 * 24 * 7 + $3; } |
419 >           NUMBER MONTHS timespec_  { $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3; } |
420 >           NUMBER YEARS timespec_   { $$ = $1 * 60 * 60 * 24 * 365 + $3; }
421 >           ;
422 >
423 > sizespec_:  { $$ = 0; } | sizespec;
424 > sizespec:   NUMBER sizespec_ { $$ = $1 + $2; } |
425 >            NUMBER BYTES sizespec_ { $$ = $1 + $3; } |
426 >            NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; } |
427 >            NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
428 >            ;
429  
430  
431   /***************************************************************************
# Line 465 | Line 453 | modules_path: PATH '=' QSTRING ';'
453   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
454  
455   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
456 < serverinfo_item:        serverinfo_name | serverinfo_vhost |
457 <                        serverinfo_hub | serverinfo_description |
458 <                        serverinfo_network_name | serverinfo_network_desc |
459 <                        serverinfo_max_clients | serverinfo_max_nick_length |
460 <                        serverinfo_max_topic_length | serverinfo_ssl_dh_param_file |
461 <                        serverinfo_rsa_private_key_file | serverinfo_vhost6 |
462 <                        serverinfo_sid | serverinfo_ssl_certificate_file |
463 <                        serverinfo_ssl_client_method | serverinfo_ssl_server_method |
456 > serverinfo_item:        serverinfo_name |
457 >                        serverinfo_vhost |
458 >                        serverinfo_hub |
459 >                        serverinfo_description |
460 >                        serverinfo_network_name |
461 >                        serverinfo_network_desc |
462 >                        serverinfo_default_max_clients |
463 >                        serverinfo_max_nick_length |
464 >                        serverinfo_max_topic_length |
465 >                        serverinfo_ssl_dh_param_file |
466 >                        serverinfo_ssl_dh_elliptic_curve |
467 >                        serverinfo_rsa_private_key_file |
468 >                        serverinfo_vhost6 |
469 >                        serverinfo_sid |
470 >                        serverinfo_ssl_certificate_file |
471                          serverinfo_ssl_cipher_list |
472 <                        error ';' ;
472 >                        serverinfo_ssl_message_digest_algorithm |
473 >                        error ';' ;
474  
475  
480 serverinfo_ssl_client_method: T_SSL_CLIENT_METHOD '=' client_method_types ';' ;
481 serverinfo_ssl_server_method: T_SSL_SERVER_METHOD '=' server_method_types ';' ;
482
483 client_method_types: client_method_types ',' client_method_type_item | client_method_type_item;
484 client_method_type_item: T_SSLV3
485 {
486 #ifdef HAVE_LIBCRYPTO
487  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
488    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv3);
489 #endif
490 } | T_TLSV1
491 {
492 #ifdef HAVE_LIBCRYPTO
493  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
494    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_TLSv1);
495 #endif
496 };
497
498 server_method_types: server_method_types ',' server_method_type_item | server_method_type_item;
499 server_method_type_item: T_SSLV3
500 {
501 #ifdef HAVE_LIBCRYPTO
502  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
503    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3);
504 #endif
505 } | T_TLSV1
506 {
507 #ifdef HAVE_LIBCRYPTO
508  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
509    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_TLSv1);
510 #endif
511 };
512
476   serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
477   {
478   #ifdef HAVE_LIBCRYPTO
479 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
479 >  if (conf_parser_ctx.pass == 2)
480    {
481 <    if (!ServerInfo.rsa_private_key_file)
481 >    if (!ConfigServerInfo.rsa_private_key_file)
482      {
483        conf_error_report("No rsa_private_key_file specified, SSL disabled");
484        break;
485      }
486  
487 <    if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string,
488 <                                     SSL_FILETYPE_PEM) <= 0 ||
526 <        SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string,
527 <                                     SSL_FILETYPE_PEM) <= 0)
487 >    if (SSL_CTX_use_certificate_chain_file(ConfigServerInfo.server_ctx, yylval.string) <= 0 ||
488 >        SSL_CTX_use_certificate_chain_file(ConfigServerInfo.client_ctx, yylval.string) <= 0)
489      {
490        report_crypto_errors();
491        conf_error_report("Could not open/read certificate file");
492        break;
493      }
494  
495 <    if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file,
495 >    if (SSL_CTX_use_PrivateKey_file(ConfigServerInfo.server_ctx, ConfigServerInfo.rsa_private_key_file,
496                                      SSL_FILETYPE_PEM) <= 0 ||
497 <        SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file,
497 >        SSL_CTX_use_PrivateKey_file(ConfigServerInfo.client_ctx, ConfigServerInfo.rsa_private_key_file,
498                                      SSL_FILETYPE_PEM) <= 0)
499      {
500        report_crypto_errors();
# Line 541 | Line 502 | serverinfo_ssl_certificate_file: SSL_CER
502        break;
503      }
504  
505 <    if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) ||
506 <        !SSL_CTX_check_private_key(ServerInfo.client_ctx))
505 >    if (!SSL_CTX_check_private_key(ConfigServerInfo.server_ctx) ||
506 >        !SSL_CTX_check_private_key(ConfigServerInfo.client_ctx))
507      {
508        report_crypto_errors();
509        conf_error_report("Could not read RSA private key");
# Line 560 | Line 521 | serverinfo_rsa_private_key_file: RSA_PRI
521    if (conf_parser_ctx.pass != 1)
522      break;
523  
524 <  if (ServerInfo.rsa_private_key)
524 >  if (ConfigServerInfo.rsa_private_key)
525    {
526 <    RSA_free(ServerInfo.rsa_private_key);
527 <    ServerInfo.rsa_private_key = NULL;
526 >    RSA_free(ConfigServerInfo.rsa_private_key);
527 >    ConfigServerInfo.rsa_private_key = NULL;
528    }
529  
530 <  if (ServerInfo.rsa_private_key_file)
530 >  if (ConfigServerInfo.rsa_private_key_file)
531    {
532 <    MyFree(ServerInfo.rsa_private_key_file);
533 <    ServerInfo.rsa_private_key_file = NULL;
532 >    MyFree(ConfigServerInfo.rsa_private_key_file);
533 >    ConfigServerInfo.rsa_private_key_file = NULL;
534    }
535  
536 <  ServerInfo.rsa_private_key_file = xstrdup(yylval.string);
536 >  ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
537  
538    if ((file = BIO_new_file(yylval.string, "r")) == NULL)
539    {
# Line 580 | Line 541 | serverinfo_rsa_private_key_file: RSA_PRI
541      break;
542    }
543  
544 <  ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
544 >  ConfigServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
545  
546    BIO_set_close(file, BIO_CLOSE);
547    BIO_free(file);
548  
549 <  if (ServerInfo.rsa_private_key == NULL)
549 >  if (ConfigServerInfo.rsa_private_key == NULL)
550    {
551      conf_error_report("Couldn't extract key, ignoring");
552      break;
553    }
554  
555 <  if (!RSA_check_key(ServerInfo.rsa_private_key))
555 >  if (!RSA_check_key(ConfigServerInfo.rsa_private_key))
556    {
557 <    RSA_free(ServerInfo.rsa_private_key);
558 <    ServerInfo.rsa_private_key = NULL;
557 >    RSA_free(ConfigServerInfo.rsa_private_key);
558 >    ConfigServerInfo.rsa_private_key = NULL;
559  
560      conf_error_report("Invalid key, ignoring");
561      break;
562    }
563  
564 <  /* require 2048 bit (256 byte) key */
604 <  if (RSA_size(ServerInfo.rsa_private_key) != 256)
564 >  if (RSA_size(ConfigServerInfo.rsa_private_key) < 128)
565    {
566 <    RSA_free(ServerInfo.rsa_private_key);
567 <    ServerInfo.rsa_private_key = NULL;
566 >    RSA_free(ConfigServerInfo.rsa_private_key);
567 >    ConfigServerInfo.rsa_private_key = NULL;
568  
569 <    conf_error_report("Not a 2048 bit key, ignoring");
569 >    conf_error_report("Ignoring serverinfo::rsa_private_key_file -- need at least a 1024 bit key size");
570    }
571   #endif
572   };
573  
574   serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
575   {
616 /* TBD - XXX: error reporting */
576   #ifdef HAVE_LIBCRYPTO
577 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
577 >  if (conf_parser_ctx.pass == 2)
578    {
579      BIO *file = BIO_new_file(yylval.string, "r");
580  
# Line 630 | Line 589 | serverinfo_ssl_dh_param_file: SSL_DH_PAR
589          if (DH_size(dh) < 128)
590            conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
591          else
592 <          SSL_CTX_set_tmp_dh(ServerInfo.server_ctx, dh);
592 >          SSL_CTX_set_tmp_dh(ConfigServerInfo.server_ctx, dh);
593  
594          DH_free(dh);
595        }
596      }
597 +    else
598 +      conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- could not open/read Diffie-Hellman parameter file");
599    }
600   #endif
601   };
# Line 642 | Line 603 | serverinfo_ssl_dh_param_file: SSL_DH_PAR
603   serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
604   {
605   #ifdef HAVE_LIBCRYPTO
606 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
607 <    SSL_CTX_set_cipher_list(ServerInfo.server_ctx, yylval.string);
606 >  if (conf_parser_ctx.pass == 2)
607 >    SSL_CTX_set_cipher_list(ConfigServerInfo.server_ctx, yylval.string);
608 > #endif
609 > };
610 >
611 > serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
612 > {
613 > #ifdef HAVE_LIBCRYPTO
614 >  if (conf_parser_ctx.pass == 2)
615 >  {
616 >    if ((ConfigServerInfo.message_digest_algorithm = EVP_get_digestbyname(yylval.string)) == NULL)
617 >    {
618 >      ConfigServerInfo.message_digest_algorithm = EVP_sha256();
619 >      conf_error_report("Ignoring serverinfo::ssl_message_digest_algorithm -- unknown message digest algorithm");
620 >    }
621 >  }
622 > #endif
623 > }
624 >
625 > serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
626 > {
627 > #ifdef HAVE_LIBCRYPTO
628 > #if OPENSSL_VERSION_NUMBER >= 0x009080FFL && !defined(OPENSSL_NO_ECDH)
629 >  int nid = 0;
630 >  EC_KEY *key = NULL;
631 >
632 >  if (conf_parser_ctx.pass == 2)
633 >  {
634 >    if ((nid = OBJ_sn2nid(yylval.string)) == 0)
635 >    {
636 >        conf_error_report("Ignoring serverinfo::ssl_dh_elliptic_curve -- unknown curve name");
637 >        break;
638 >    }
639 >
640 >    if ((key = EC_KEY_new_by_curve_name(nid)) == NULL)
641 >    {
642 >      conf_error_report("Ignoring serverinfo::ssl_dh_elliptic_curve -- could not create curve");
643 >      break;
644 >    }
645 >
646 >    SSL_CTX_set_tmp_ecdh(ConfigServerInfo.server_ctx, key);
647 >    EC_KEY_free(key);
648 > }
649 > #endif
650   #endif
651   };
652  
653 < serverinfo_name: NAME '=' QSTRING ';'
653 > serverinfo_name: NAME '=' QSTRING ';'
654   {
655    /* this isn't rehashable */
656 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.name)
656 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
657    {
658      if (valid_servname(yylval.string))
659 <      ServerInfo.name = xstrdup(yylval.string);
659 >      ConfigServerInfo.name = xstrdup(yylval.string);
660      else
661      {
662        conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
# Line 662 | Line 665 | serverinfo_name: NAME '=' QSTRING ';'
665    }
666   };
667  
668 < serverinfo_sid: IRCD_SID '=' QSTRING ';'
668 > serverinfo_sid: IRCD_SID '=' QSTRING ';'
669   {
670    /* this isn't rehashable */
671 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.sid)
671 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
672    {
673      if (valid_sid(yylval.string))
674 <      ServerInfo.sid = xstrdup(yylval.string);
674 >      ConfigServerInfo.sid = xstrdup(yylval.string);
675      else
676      {
677        conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
# Line 681 | Line 684 | serverinfo_description: DESCRIPTION '='
684   {
685    if (conf_parser_ctx.pass == 2)
686    {
687 <    MyFree(ServerInfo.description);
688 <    ServerInfo.description = xstrdup(yylval.string);
687 >    MyFree(ConfigServerInfo.description);
688 >    ConfigServerInfo.description = xstrdup(yylval.string);
689 >    strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info));
690    }
691   };
692  
# Line 692 | Line 696 | serverinfo_network_name: NETWORK_NAME '=
696    {
697      char *p;
698  
699 <    if ((p = strchr(yylval.string, ' ')) != NULL)
700 <      p = '\0';
699 >    if ((p = strchr(yylval.string, ' ')))
700 >      *p = '\0';
701  
702 <    MyFree(ServerInfo.network_name);
703 <    ServerInfo.network_name = xstrdup(yylval.string);
702 >    MyFree(ConfigServerInfo.network_name);
703 >    ConfigServerInfo.network_name = xstrdup(yylval.string);
704    }
705   };
706  
# Line 705 | Line 709 | serverinfo_network_desc: NETWORK_DESC '=
709    if (conf_parser_ctx.pass != 2)
710      break;
711  
712 <  MyFree(ServerInfo.network_desc);
713 <  ServerInfo.network_desc = xstrdup(yylval.string);
712 >  MyFree(ConfigServerInfo.network_desc);
713 >  ConfigServerInfo.network_desc = xstrdup(yylval.string);
714   };
715  
716   serverinfo_vhost: VHOST '=' QSTRING ';'
# Line 725 | Line 729 | serverinfo_vhost: VHOST '=' QSTRING ';'
729        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string);
730      else
731      {
732 <      assert(res != NULL);
732 >      assert(res);
733  
734 <      memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen);
735 <      ServerInfo.ip.ss.ss_family = res->ai_family;
736 <      ServerInfo.ip.ss_len = res->ai_addrlen;
734 >      memcpy(&ConfigServerInfo.ip, res->ai_addr, res->ai_addrlen);
735 >      ConfigServerInfo.ip.ss.ss_family = res->ai_family;
736 >      ConfigServerInfo.ip.ss_len = res->ai_addrlen;
737        freeaddrinfo(res);
738  
739 <      ServerInfo.specific_ipv4_vhost = 1;
739 >      ConfigServerInfo.specific_ipv4_vhost = 1;
740      }
741    }
742   };
743  
744   serverinfo_vhost6: VHOST6 '=' QSTRING ';'
745   {
742 #ifdef IPV6
746    if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
747    {
748      struct addrinfo hints, *res;
# Line 754 | Line 757 | serverinfo_vhost6: VHOST6 '=' QSTRING ';
757        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string);
758      else
759      {
760 <      assert(res != NULL);
760 >      assert(res);
761  
762 <      memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen);
763 <      ServerInfo.ip6.ss.ss_family = res->ai_family;
764 <      ServerInfo.ip6.ss_len = res->ai_addrlen;
762 >      memcpy(&ConfigServerInfo.ip6, res->ai_addr, res->ai_addrlen);
763 >      ConfigServerInfo.ip6.ss.ss_family = res->ai_family;
764 >      ConfigServerInfo.ip6.ss_len = res->ai_addrlen;
765        freeaddrinfo(res);
766  
767 <      ServerInfo.specific_ipv6_vhost = 1;
767 >      ConfigServerInfo.specific_ipv6_vhost = 1;
768      }
769    }
767 #endif
770   };
771  
772 < serverinfo_max_clients: T_MAX_CLIENTS '=' NUMBER ';'
772 > serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';'
773   {
774    if (conf_parser_ctx.pass != 2)
775      break;
776  
777    if ($3 < MAXCLIENTS_MIN)
778    {
779 <    char buf[IRCD_BUFSIZE];
779 >    char buf[IRCD_BUFSIZE] = "";
780  
781      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
782      conf_error_report(buf);
783 <    ServerInfo.max_clients = MAXCLIENTS_MIN;
783 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MIN;
784    }
785    else if ($3 > MAXCLIENTS_MAX)
786    {
787 <    char buf[IRCD_BUFSIZE];
787 >    char buf[IRCD_BUFSIZE] = "";
788  
789      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
790      conf_error_report(buf);
791 <    ServerInfo.max_clients = MAXCLIENTS_MAX;
791 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX;
792    }
793    else
794 <    ServerInfo.max_clients = $3;
794 >    ConfigServerInfo.default_max_clients = $3;
795   };
796  
797   serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';'
# Line 800 | Line 802 | serverinfo_max_nick_length: MAX_NICK_LEN
802    if ($3 < 9)
803    {
804      conf_error_report("max_nick_length too low, setting to 9");
805 <    ServerInfo.max_nick_length = 9;
805 >    ConfigServerInfo.max_nick_length = 9;
806    }
807    else if ($3 > NICKLEN)
808    {
809 <    char buf[IRCD_BUFSIZE];
809 >    char buf[IRCD_BUFSIZE] = "";
810  
811      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
812      conf_error_report(buf);
813 <    ServerInfo.max_nick_length = NICKLEN;
813 >    ConfigServerInfo.max_nick_length = NICKLEN;
814    }
815    else
816 <    ServerInfo.max_nick_length = $3;
816 >    ConfigServerInfo.max_nick_length = $3;
817   };
818  
819   serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';'
# Line 822 | Line 824 | serverinfo_max_topic_length: MAX_TOPIC_L
824    if ($3 < 80)
825    {
826      conf_error_report("max_topic_length too low, setting to 80");
827 <    ServerInfo.max_topic_length = 80;
827 >    ConfigServerInfo.max_topic_length = 80;
828    }
829    else if ($3 > TOPICLEN)
830    {
831 <    char buf[IRCD_BUFSIZE];
831 >    char buf[IRCD_BUFSIZE] = "";
832  
833      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
834      conf_error_report(buf);
835 <    ServerInfo.max_topic_length = TOPICLEN;
835 >    ConfigServerInfo.max_topic_length = TOPICLEN;
836    }
837    else
838 <    ServerInfo.max_topic_length = $3;
838 >    ConfigServerInfo.max_topic_length = $3;
839   };
840  
841 < serverinfo_hub: HUB '=' TBOOL ';'
841 > serverinfo_hub: HUB '=' TBOOL ';'
842   {
843    if (conf_parser_ctx.pass == 2)
844 <    ServerInfo.hub = yylval.number;
844 >    ConfigServerInfo.hub = yylval.number;
845   };
846  
847   /***************************************************************************
# Line 848 | Line 850 | serverinfo_hub: HUB '=' TBOOL ';'
850   admin_entry: ADMIN  '{' admin_items '}' ';' ;
851  
852   admin_items: admin_items admin_item | admin_item;
853 < admin_item:  admin_name | admin_description |
854 <             admin_email | error ';' ;
853 > admin_item:  admin_name |
854 >             admin_description |
855 >             admin_email |
856 >             error ';' ;
857  
858 < admin_name: NAME '=' QSTRING ';'
858 > admin_name: NAME '=' QSTRING ';'
859   {
860    if (conf_parser_ctx.pass != 2)
861      break;
862  
863 <  MyFree(AdminInfo.name);
864 <  AdminInfo.name = xstrdup(yylval.string);
863 >  MyFree(ConfigAdminInfo.name);
864 >  ConfigAdminInfo.name = xstrdup(yylval.string);
865   };
866  
867   admin_email: EMAIL '=' QSTRING ';'
# Line 865 | Line 869 | admin_email: EMAIL '=' QSTRING ';'
869    if (conf_parser_ctx.pass != 2)
870      break;
871  
872 <  MyFree(AdminInfo.email);
873 <  AdminInfo.email = xstrdup(yylval.string);
872 >  MyFree(ConfigAdminInfo.email);
873 >  ConfigAdminInfo.email = xstrdup(yylval.string);
874   };
875  
876   admin_description: DESCRIPTION '=' QSTRING ';'
# Line 874 | Line 878 | admin_description: DESCRIPTION '=' QSTRI
878    if (conf_parser_ctx.pass != 2)
879      break;
880  
881 <  MyFree(AdminInfo.description);
882 <  AdminInfo.description = xstrdup(yylval.string);
881 >  MyFree(ConfigAdminInfo.description);
882 >  ConfigAdminInfo.description = xstrdup(yylval.string);
883   };
884  
885   /***************************************************************************
886   * motd section
887   ***************************************************************************/
888 < motd_entry: MOTD
888 > motd_entry: MOTD
889   {
890    if (conf_parser_ctx.pass == 2)
891      reset_block_state();
892   } '{' motd_items '}' ';'
893   {
894 <  dlink_node *ptr = NULL;
894 >  dlink_node *node = NULL;
895  
896    if (conf_parser_ctx.pass != 2)
897      break;
# Line 895 | Line 899 | motd_entry: MOTD
899    if (!block_state.file.buf[0])
900      break;
901  
902 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
903 <    motd_add(ptr->data, block_state.file.buf);
902 >  DLINK_FOREACH(node, block_state.mask.list.head)
903 >    motd_add(node->data, block_state.file.buf);
904   };
905  
906   motd_items: motd_items motd_item | motd_item;
907   motd_item:  motd_mask | motd_file | error ';' ;
908  
909 < motd_mask: MASK '=' QSTRING ';'
909 > motd_mask: MASK '=' QSTRING ';'
910   {
911    if (conf_parser_ctx.pass == 2)
912      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list);
# Line 915 | Line 919 | motd_file: T_FILE '=' QSTRING ';'
919   };
920  
921   /***************************************************************************
922 + * pseudo section
923 + ***************************************************************************/
924 + pseudo_entry: T_PSEUDO
925 + {
926 +  if (conf_parser_ctx.pass == 2)
927 +    reset_block_state();
928 + } '{' pseudo_items '}' ';'
929 + {
930 +  if (conf_parser_ctx.pass != 2)
931 +    break;
932 +
933 +  if (!block_state.command.buf[0] ||
934 +      !block_state.name.buf[0] ||
935 +      !block_state.nick.buf[0] ||
936 +      !block_state.host.buf[0])
937 +    break;
938 +
939 +  pseudo_register(block_state.name.buf, block_state.nick.buf, block_state.host.buf,
940 +                  block_state.prepend.buf, block_state.command.buf);
941 + };
942 +
943 + pseudo_items: pseudo_items pseudo_item | pseudo_item;
944 + pseudo_item:  pseudo_command | pseudo_prepend | pseudo_name | pseudo_target | error ';' ;
945 +
946 + pseudo_command: T_COMMAND '=' QSTRING ';'
947 + {
948 +  if (conf_parser_ctx.pass == 2)
949 +    strlcpy(block_state.command.buf, yylval.string, sizeof(block_state.command.buf));
950 + };
951 +
952 + pseudo_name: NAME '=' QSTRING ';'
953 + {
954 +  if (conf_parser_ctx.pass == 2)
955 +    strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
956 + };
957 +
958 + pseudo_prepend: T_PREPEND '=' QSTRING ';'
959 + {
960 +  if (conf_parser_ctx.pass == 2)
961 +    strlcpy(block_state.prepend.buf, yylval.string, sizeof(block_state.prepend.buf));
962 + };
963 +
964 + pseudo_target: T_TARGET '=' QSTRING ';'
965 + {
966 +  if (conf_parser_ctx.pass == 2)
967 +  {
968 +    struct split_nuh_item nuh;
969 +
970 +    nuh.nuhmask  = yylval.string;
971 +    nuh.nickptr  = NULL;
972 +    nuh.userptr  = block_state.nick.buf;
973 +    nuh.hostptr  = block_state.host.buf;
974 +    nuh.nicksize = 0;
975 +    nuh.usersize = sizeof(block_state.nick.buf);
976 +    nuh.hostsize = sizeof(block_state.host.buf);
977 +
978 +    split_nuh(&nuh);
979 +  }
980 + };
981 +
982 + /***************************************************************************
983   *  section logging
984   ***************************************************************************/
985   logging_entry:          T_LOG  '{' logging_items '}' ';' ;
986   logging_items:          logging_items logging_item | logging_item ;
987  
988 < logging_item:           logging_use_logging | logging_file_entry |
989 <                        error ';' ;
988 > logging_item:           logging_use_logging | logging_file_entry |
989 >                        error ';' ;
990  
991   logging_use_logging: USE_LOGGING '=' TBOOL ';'
992   {
993    if (conf_parser_ctx.pass == 2)
994 <    ConfigLoggingEntry.use_logging = yylval.number;
994 >    ConfigLog.use_logging = yylval.number;
995   };
996  
997   logging_file_entry:
# Line 980 | Line 1045 | logging_file_type_item:  USER
1045   {
1046    if (conf_parser_ctx.pass == 2)
1047      block_state.type.value = LOG_TYPE_OPER;
983 } | GLINE
984 {
985  if (conf_parser_ctx.pass == 2)
986    block_state.type.value = LOG_TYPE_GLINE;
1048   } | XLINE
1049   {
1050    if (conf_parser_ctx.pass == 2)
# Line 1014 | Line 1075 | logging_file_type_item:  USER
1075   /***************************************************************************
1076   * section oper
1077   ***************************************************************************/
1078 < oper_entry: OPERATOR
1078 > oper_entry: OPERATOR
1079   {
1080    if (conf_parser_ctx.pass != 2)
1081      break;
# Line 1023 | Line 1084 | oper_entry: OPERATOR
1084    block_state.flags.value |= CONF_FLAGS_ENCRYPTED;
1085   } '{' oper_items '}' ';'
1086   {
1087 <  dlink_node *ptr = NULL;
1087 >  dlink_node *node = NULL;
1088  
1089    if (conf_parser_ctx.pass != 2)
1090      break;
# Line 1039 | Line 1100 | oper_entry: OPERATOR
1100      break;
1101   #endif
1102  
1103 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1103 >  DLINK_FOREACH(node, block_state.mask.list.head)
1104    {
1105      struct MaskItem *conf = NULL;
1106      struct split_nuh_item nuh;
1107  
1108 <    nuh.nuhmask  = ptr->data;
1108 >    nuh.nuhmask  = node->data;
1109      nuh.nickptr  = NULL;
1110      nuh.userptr  = block_state.user.buf;
1111      nuh.hostptr  = block_state.host.buf;
# Line 1064 | Line 1125 | oper_entry: OPERATOR
1125      if (block_state.rpass.buf[0])
1126        conf->passwd = xstrdup(block_state.rpass.buf);
1127  
1128 +    if (block_state.whois.buf[0])
1129 +      conf->whois = xstrdup(block_state.whois.buf);
1130 +
1131      conf->flags = block_state.flags.value;
1132      conf->modes = block_state.modes.value;
1133      conf->port  = block_state.port.value;
# Line 1079 | Line 1143 | oper_entry: OPERATOR
1143  
1144        if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1145        {
1146 <        conf_error_report("Ignoring rsa_public_key_file -- file doesn't exist");
1146 >        ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- file doesn't exist");
1147          break;
1148        }
1149  
1150        if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1151 <        conf_error_report("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
1151 >        ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key invalid; check key syntax");
1152 >      else
1153 >      {
1154 >        if (RSA_size(pkey) > 128)
1155 >          ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key size must be 1024 or below");
1156 >        else
1157 >          conf->rsa_public_key = pkey;
1158 >      }
1159  
1089      conf->rsa_public_key = pkey;
1160        BIO_set_close(file, BIO_CLOSE);
1161        BIO_free(file);
1162      }
# Line 1095 | Line 1165 | oper_entry: OPERATOR
1165   };
1166  
1167   oper_items:     oper_items oper_item | oper_item;
1168 < oper_item:      oper_name | oper_user | oper_password |
1169 <                oper_umodes | oper_class | oper_encrypted |
1170 <                oper_rsa_public_key_file | oper_ssl_certificate_fingerprint |
1171 <                oper_ssl_connection_required |
1172 <                oper_flags | error ';' ;
1168 > oper_item:      oper_name |
1169 >                oper_user |
1170 >                oper_password |
1171 >                oper_whois |
1172 >                oper_umodes |
1173 >                oper_class |
1174 >                oper_encrypted |
1175 >                oper_rsa_public_key_file |
1176 >                oper_ssl_certificate_fingerprint |
1177 >                oper_ssl_connection_required |
1178 >                oper_flags |
1179 >                error ';' ;
1180  
1181   oper_name: NAME '=' QSTRING ';'
1182   {
# Line 1119 | Line 1196 | oper_password: PASSWORD '=' QSTRING ';'
1196      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1197   };
1198  
1199 + oper_whois: WHOIS '=' QSTRING ';'
1200 + {
1201 +  if (conf_parser_ctx.pass == 2)
1202 +    strlcpy(block_state.whois.buf, yylval.string, sizeof(block_state.whois.buf));
1203 + };
1204 +
1205   oper_encrypted: ENCRYPTED '=' TBOOL ';'
1206   {
1207    if (conf_parser_ctx.pass != 2)
# Line 1190 | Line 1273 | oper_umodes_item:  T_BOTS
1273   {
1274    if (conf_parser_ctx.pass == 2)
1275      block_state.modes.value |= UMODE_HIDDEN;
1276 + } | HIDE_CHANS
1277 + {
1278 +  if (conf_parser_ctx.pass == 2)
1279 +    block_state.modes.value |= UMODE_HIDECHANS;
1280 + } | HIDE_IDLE
1281 + {
1282 +  if (conf_parser_ctx.pass == 2)
1283 +    block_state.modes.value |= UMODE_HIDEIDLE;
1284   } | T_SKILL
1285   {
1286    if (conf_parser_ctx.pass == 2)
# Line 1214 | Line 1305 | oper_umodes_item:  T_BOTS
1305   {
1306    if (conf_parser_ctx.pass == 2)
1307      block_state.modes.value |= UMODE_EXTERNAL;
1217 } | T_OPERWALL
1218 {
1219  if (conf_parser_ctx.pass == 2)
1220    block_state.modes.value |= UMODE_OPERWALL;
1308   } | T_SERVNOTICE
1309   {
1310    if (conf_parser_ctx.pass == 2)
# Line 1286 | Line 1373 | oper_flags_item: KILL ':' REMOTE
1373   } | KLINE
1374   {
1375    if (conf_parser_ctx.pass == 2)
1376 <    block_state.port.value |= OPER_FLAG_K;
1376 >    block_state.port.value |= OPER_FLAG_KLINE;
1377   } | UNKLINE
1378   {
1379    if (conf_parser_ctx.pass == 2)
# Line 1302 | Line 1389 | oper_flags_item: KILL ':' REMOTE
1389   } | XLINE
1390   {
1391    if (conf_parser_ctx.pass == 2)
1392 <    block_state.port.value |= OPER_FLAG_X;
1393 < } | GLINE
1392 >    block_state.port.value |= OPER_FLAG_XLINE;
1393 > } | T_UNXLINE
1394   {
1395    if (conf_parser_ctx.pass == 2)
1396 <    block_state.port.value |= OPER_FLAG_GLINE;
1396 >    block_state.port.value |= OPER_FLAG_UNXLINE;
1397   } | DIE
1398   {
1399    if (conf_parser_ctx.pass == 2)
# Line 1323 | Line 1410 | oper_flags_item: KILL ':' REMOTE
1410   {
1411    if (conf_parser_ctx.pass == 2)
1412      block_state.port.value |= OPER_FLAG_ADMIN;
1326 } | T_OPERWALL
1327 {
1328  if (conf_parser_ctx.pass == 2)
1329    block_state.port.value |= OPER_FLAG_OPERWALL;
1413   } | T_GLOBOPS
1414   {
1415    if (conf_parser_ctx.pass == 2)
# Line 1351 | Line 1434 | oper_flags_item: KILL ':' REMOTE
1434   {
1435    if (conf_parser_ctx.pass == 2)
1436      block_state.port.value |= OPER_FLAG_MODULE;
1437 + } | T_OPME
1438 + {
1439 +  if (conf_parser_ctx.pass == 2)
1440 +    block_state.port.value |= OPER_FLAG_OPME;
1441   };
1442  
1443  
# Line 1394 | Line 1481 | class_entry: CLASS
1481    class->max_ident = block_state.max_ident.value;
1482    class->max_sendq = block_state.max_sendq.value;
1483    class->max_recvq = block_state.max_recvq.value;
1484 +  class->max_channels = block_state.max_channels.value;
1485  
1486    if (block_state.min_idle.value > block_state.max_idle.value)
1487    {
# Line 1406 | Line 1494 | class_entry: CLASS
1494    class->min_idle = block_state.min_idle.value;
1495    class->max_idle = block_state.max_idle.value;
1496  
1497 <  if (class->number_per_cidr && block_state.number_per_cidr.value)
1410 <    if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1411 <        (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
1412 <      if ((class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value) ||
1413 <          (class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value))
1414 <        rebuild_cidr_list(class);
1497 >  rebuild_cidr_list(class);
1498  
1499    class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value;
1500    class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value;
# Line 1420 | Line 1503 | class_entry: CLASS
1503  
1504   class_items:    class_items class_item | class_item;
1505   class_item:     class_name |
1506 <                class_cidr_bitlen_ipv4 | class_cidr_bitlen_ipv6 |
1506 >                class_cidr_bitlen_ipv4 |
1507 >                class_cidr_bitlen_ipv6 |
1508                  class_ping_time |
1509 <                class_number_per_cidr |
1509 >                class_number_per_cidr |
1510                  class_number_per_ip |
1511                  class_connectfreq |
1512 +                class_max_channels |
1513                  class_max_number |
1514 <                class_max_global |
1515 <                class_max_local |
1516 <                class_max_ident |
1514 >                class_max_global |
1515 >                class_max_local |
1516 >                class_max_ident |
1517                  class_sendq | class_recvq |
1518                  class_min_idle |
1519                  class_max_idle |
1520                  class_flags |
1521 <                error ';' ;
1521 >                error ';' ;
1522  
1523 < class_name: NAME '=' QSTRING ';'
1523 > class_name: NAME '=' QSTRING ';'
1524   {
1525    if (conf_parser_ctx.pass == 1)
1526      strlcpy(block_state.class.buf, yylval.string, sizeof(block_state.class.buf));
# Line 1459 | Line 1544 | class_connectfreq: CONNECTFREQ '=' times
1544      block_state.con_freq.value = $3;
1545   };
1546  
1547 + class_max_channels: MAX_CHANNELS '=' NUMBER ';'
1548 + {
1549 +  if (conf_parser_ctx.pass == 1)
1550 +    block_state.max_channels.value = $3;
1551 + };
1552 +
1553   class_max_number: MAX_NUMBER '=' NUMBER ';'
1554   {
1555    if (conf_parser_ctx.pass == 1)
# Line 1590 | Line 1681 | port_item: NUMBER
1681   {
1682    if (conf_parser_ctx.pass == 2)
1683    {
1684 + #ifndef HAVE_LIBCRYPTO
1685      if (block_state.flags.value & LISTENER_SSL)
1686 < #ifdef HAVE_LIBCRYPTO
1687 <      if (!ServerInfo.server_ctx)
1686 >    {
1687 >      conf_error_report("SSL not available - port closed");
1688 >      break;
1689 >    }
1690   #endif
1691 <      {
1598 <        conf_error_report("SSL not available - port closed");
1599 <        break;
1600 <      }
1601 <    add_listener($1, block_state.addr.buf, block_state.flags.value);
1691 >    listener_add($1, block_state.addr.buf, block_state.flags.value);
1692    }
1693   } | NUMBER TWODOTS NUMBER
1694   {
1695    if (conf_parser_ctx.pass == 2)
1696    {
1697 <    int i;
1608 <
1697 > #ifndef HAVE_LIBCRYPTO
1698      if (block_state.flags.value & LISTENER_SSL)
1699 < #ifdef HAVE_LIBCRYPTO
1700 <      if (!ServerInfo.server_ctx)
1699 >    {
1700 >      conf_error_report("SSL not available - port closed");
1701 >      break;
1702 >    }
1703   #endif
1613      {
1614        conf_error_report("SSL not available - port closed");
1615        break;
1616      }
1704  
1705 <    for (i = $1; i <= $3; ++i)
1706 <      add_listener(i, block_state.addr.buf, block_state.flags.value);
1705 >    for (int i = $1; i <= $3; ++i)
1706 >      listener_add(i, block_state.addr.buf, block_state.flags.value);
1707    }
1708   };
1709  
# Line 1641 | Line 1728 | auth_entry: IRCD_AUTH
1728      reset_block_state();
1729   } '{' auth_items '}' ';'
1730   {
1731 <  dlink_node *ptr = NULL;
1731 >  dlink_node *node = NULL;
1732  
1733    if (conf_parser_ctx.pass != 2)
1734      break;
1735  
1736 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1736 >  DLINK_FOREACH(node, block_state.mask.list.head)
1737    {
1738      struct MaskItem *conf = NULL;
1739      struct split_nuh_item nuh;
1740  
1741 <    nuh.nuhmask  = ptr->data;
1741 >    nuh.nuhmask  = node->data;
1742      nuh.nickptr  = NULL;
1743      nuh.userptr  = block_state.user.buf;
1744      nuh.hostptr  = block_state.host.buf;
# Line 1675 | Line 1762 | auth_entry: IRCD_AUTH
1762      conf_add_class_to_conf(conf, block_state.class.buf);
1763      add_conf_by_address(CONF_CLIENT, conf);
1764    }
1765 < };
1765 > };
1766  
1767   auth_items:     auth_items auth_item | auth_item;
1768 < auth_item:      auth_user | auth_passwd | auth_class | auth_flags |
1769 <                auth_spoof | auth_redir_serv | auth_redir_port |
1770 <                auth_encrypted | error ';' ;
1768 > auth_item:      auth_user |
1769 >                auth_passwd |
1770 >                auth_class |
1771 >                auth_flags |
1772 >                auth_spoof |
1773 >                auth_redir_serv |
1774 >                auth_redir_port |
1775 >                auth_encrypted |
1776 >                error ';' ;
1777  
1778   auth_user: USER '=' QSTRING ';'
1779   {
# Line 1730 | Line 1823 | auth_flags_item: SPOOF_NOTICE
1823   {
1824    if (conf_parser_ctx.pass == 2)
1825      block_state.flags.value |= CONF_FLAGS_EXEMPTKLINE;
1826 + } | XLINE_EXEMPT
1827 + {
1828 +  if (conf_parser_ctx.pass == 2)
1829 +    block_state.flags.value |= CONF_FLAGS_EXEMPTXLINE;
1830   } | NEED_IDENT
1831   {
1832    if (conf_parser_ctx.pass == 2)
# Line 1742 | Line 1839 | auth_flags_item: SPOOF_NOTICE
1839   {
1840    if (conf_parser_ctx.pass == 2)
1841      block_state.flags.value |= CONF_FLAGS_NO_TILDE;
1745 } | GLINE_EXEMPT
1746 {
1747  if (conf_parser_ctx.pass == 2)
1748    block_state.flags.value |= CONF_FLAGS_EXEMPTGLINE;
1842   } | RESV_EXEMPT
1843   {
1844    if (conf_parser_ctx.pass == 2)
# Line 1760 | Line 1853 | auth_flags_item: SPOOF_NOTICE
1853      block_state.flags.value |= CONF_FLAGS_NEED_PASSWORD;
1854   };
1855  
1856 < auth_spoof: SPOOF '=' QSTRING ';'
1856 > auth_spoof: SPOOF '=' QSTRING ';'
1857   {
1858    if (conf_parser_ctx.pass != 2)
1859      break;
1860  
1861 <  if (strlen(yylval.string) <= HOSTLEN && valid_hostname(yylval.string))
1861 >  if (valid_hostname(yylval.string))
1862    {
1863      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
1864      block_state.flags.value |= CONF_FLAGS_SPOOF_IP;
# Line 1811 | Line 1904 | resv_entry: RESV
1904    create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1905   };
1906  
1907 < resv_items:     resv_items resv_item | resv_item;
1908 < resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1907 > resv_items:     resv_items resv_item | resv_item;
1908 > resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1909  
1910   resv_mask: MASK '=' QSTRING ';'
1911   {
# Line 1982 | Line 2075 | cluster_entry: T_CLUSTER
2075    conf->name = xstrdup(block_state.name.buf);
2076   };
2077  
2078 < cluster_items:  cluster_items cluster_item | cluster_item;
2079 < cluster_item:   cluster_name | cluster_type | error ';' ;
2078 > cluster_items:  cluster_items cluster_item | cluster_item;
2079 > cluster_item:   cluster_name | cluster_type | error ';' ;
2080  
2081   cluster_name: NAME '=' QSTRING ';'
2082   {
# Line 1997 | Line 2090 | cluster_type: TYPE
2090      block_state.flags.value = 0;
2091   } '=' cluster_types ';' ;
2092  
2093 < cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
2093 > cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
2094   cluster_type_item: KLINE
2095   {
2096    if (conf_parser_ctx.pass == 2)
# Line 2043 | Line 2136 | cluster_type_item: KLINE
2136   /***************************************************************************
2137   *  section connect
2138   ***************************************************************************/
2139 < connect_entry: CONNECT  
2139 > connect_entry: CONNECT
2140   {
2141  
2142    if (conf_parser_ctx.pass != 2)
2143      break;
2144  
2145    reset_block_state();
2146 +  block_state.aftype.value = AF_INET;
2147    block_state.port.value = PORTNUM;
2148   } '{' connect_items '}' ';'
2149   {
# Line 2101 | Line 2195 | connect_entry: CONNECT
2195        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf);
2196      else
2197      {
2198 <      assert(res != NULL);
2198 >      assert(res);
2199  
2200        memcpy(&conf->bind, res->ai_addr, res->ai_addrlen);
2201        conf->bind.ss.ss_family = res->ai_family;
# Line 2115 | Line 2209 | connect_entry: CONNECT
2209   };
2210  
2211   connect_items:  connect_items connect_item | connect_item;
2212 < connect_item:   connect_name | connect_host | connect_vhost |
2213 <                connect_send_password | connect_accept_password |
2214 <                connect_ssl_certificate_fingerprint |
2215 <                connect_aftype | connect_port | connect_ssl_cipher_list |
2216 <                connect_flags | connect_hub_mask | connect_leaf_mask |
2217 <                connect_class | connect_encrypted |
2212 > connect_item:   connect_name |
2213 >                connect_host |
2214 >                connect_vhost |
2215 >                connect_send_password |
2216 >                connect_accept_password |
2217 >                connect_ssl_certificate_fingerprint |
2218 >                connect_aftype |
2219 >                connect_port |
2220 >                connect_ssl_cipher_list |
2221 >                connect_flags |
2222 >                connect_hub_mask |
2223 >                connect_leaf_mask |
2224 >                connect_class |
2225 >                connect_encrypted |
2226                  error ';' ;
2227  
2228   connect_name: NAME '=' QSTRING ';'
# Line 2129 | Line 2231 | connect_name: NAME '=' QSTRING ';'
2231      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2232   };
2233  
2234 < connect_host: HOST '=' QSTRING ';'
2234 > connect_host: HOST '=' QSTRING ';'
2235   {
2236    if (conf_parser_ctx.pass == 2)
2237      strlcpy(block_state.host.buf, yylval.string, sizeof(block_state.host.buf));
2238   };
2239  
2240 < connect_vhost: VHOST '=' QSTRING ';'
2240 > connect_vhost: VHOST '=' QSTRING ';'
2241   {
2242    if (conf_parser_ctx.pass == 2)
2243      strlcpy(block_state.bind.buf, yylval.string, sizeof(block_state.bind.buf));
2244   };
2245 <
2245 >
2246   connect_send_password: SEND_PASSWORD '=' QSTRING ';'
2247   {
2248    if (conf_parser_ctx.pass != 2)
# Line 2148 | Line 2250 | connect_send_password: SEND_PASSWORD '='
2250  
2251    if ($3[0] == ':')
2252      conf_error_report("Server passwords cannot begin with a colon");
2253 <  else if (strchr($3, ' ') != NULL)
2253 >  else if (strchr($3, ' '))
2254      conf_error_report("Server passwords cannot contain spaces");
2255    else
2256      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
# Line 2161 | Line 2263 | connect_accept_password: ACCEPT_PASSWORD
2263  
2264    if ($3[0] == ':')
2265      conf_error_report("Server passwords cannot begin with a colon");
2266 <  else if (strchr($3, ' ') != NULL)
2266 >  else if (strchr($3, ' '))
2267      conf_error_report("Server passwords cannot contain spaces");
2268    else
2269      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2185 | Line 2287 | connect_aftype: AFTYPE '=' T_IPV4 ';'
2287      block_state.aftype.value = AF_INET;
2288   } | AFTYPE '=' T_IPV6 ';'
2289   {
2188 #ifdef IPV6
2290    if (conf_parser_ctx.pass == 2)
2291      block_state.aftype.value = AF_INET6;
2191 #endif
2292   };
2293  
2294   connect_flags: IRCD_FLAGS
# Line 2218 | Line 2318 | connect_encrypted: ENCRYPTED '=' TBOOL '
2318    }
2319   };
2320  
2321 < connect_hub_mask: HUB_MASK '=' QSTRING ';'
2321 > connect_hub_mask: HUB_MASK '=' QSTRING ';'
2322   {
2323    if (conf_parser_ctx.pass == 2)
2324      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.hub.list);
2325   };
2326  
2327 < connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2327 > connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2328   {
2329    if (conf_parser_ctx.pass == 2)
2330      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.leaf.list);
# Line 2275 | Line 2375 | kill_entry: KILL
2375    else
2376      conf->reason = xstrdup(CONF_NOREASON);
2377    add_conf_by_address(CONF_KLINE, conf);
2378 < };
2378 > };
2379  
2380   kill_items:     kill_items kill_item | kill_item;
2381   kill_item:      kill_user | kill_reason | error;
# Line 2300 | Line 2400 | kill_user: USER '=' QSTRING ';'
2400    }
2401   };
2402  
2403 < kill_reason: REASON '=' QSTRING ';'
2403 > kill_reason: REASON '=' QSTRING ';'
2404   {
2405    if (conf_parser_ctx.pass == 2)
2406      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2309 | Line 2409 | kill_reason: REASON '=' QSTRING ';'
2409   /***************************************************************************
2410   *  section deny
2411   ***************************************************************************/
2412 < deny_entry: DENY
2412 > deny_entry: DENY
2413   {
2414    if (conf_parser_ctx.pass == 2)
2415      reset_block_state();
# Line 2334 | Line 2434 | deny_entry: DENY
2434        conf->reason = xstrdup(CONF_NOREASON);
2435      add_conf_by_address(CONF_DLINE, conf);
2436    }
2437 < };
2437 > };
2438  
2439   deny_items:     deny_items deny_item | deny_item;
2440   deny_item:      deny_ip | deny_reason | error;
# Line 2345 | Line 2445 | deny_ip: IP '=' QSTRING ';'
2445      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
2446   };
2447  
2448 < deny_reason: REASON '=' QSTRING ';'
2448 > deny_reason: REASON '=' QSTRING ';'
2449   {
2450    if (conf_parser_ctx.pass == 2)
2451      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2402 | Line 2502 | gecos_entry: GECOS
2502   gecos_items: gecos_items gecos_item | gecos_item;
2503   gecos_item:  gecos_name | gecos_reason | error;
2504  
2505 < gecos_name: NAME '=' QSTRING ';'
2505 > gecos_name: NAME '=' QSTRING ';'
2506   {
2507    if (conf_parser_ctx.pass == 2)
2508      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2509   };
2510  
2511 < gecos_reason: REASON '=' QSTRING ';'
2511 > gecos_reason: REASON '=' QSTRING ';'
2512   {
2513    if (conf_parser_ctx.pass == 2)
2514      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2421 | Line 2521 | general_entry: GENERAL
2521    '{' general_items '}' ';';
2522  
2523   general_items:      general_items general_item | general_item;
2524 < general_item:       general_hide_spoof_ips | general_ignore_bogus_ts |
2525 <                    general_failed_oper_notice | general_anti_nick_flood |
2526 <                    general_max_nick_time | general_max_nick_changes |
2527 <                    general_max_accept | general_anti_spam_exit_message_time |
2528 <                    general_ts_warn_delta | general_ts_max_delta |
2524 > general_item:       general_away_count |
2525 >                    general_away_time |
2526 >                    general_ignore_bogus_ts |
2527 >                    general_failed_oper_notice |
2528 >                    general_anti_nick_flood |
2529 >                    general_max_nick_time |
2530 >                    general_max_nick_changes |
2531 >                    general_max_accept |
2532 >                    general_anti_spam_exit_message_time |
2533 >                    general_ts_warn_delta |
2534 >                    general_ts_max_delta |
2535                      general_kill_chase_time_limit |
2536                      general_invisible_on_connect |
2537 <                    general_warn_no_nline | general_dots_in_ident |
2538 <                    general_stats_o_oper_only | general_stats_k_oper_only |
2539 <                    general_pace_wait | general_stats_i_oper_only |
2540 <                    general_pace_wait_simple | general_stats_P_oper_only |
2537 >                    general_warn_no_connect_block |
2538 >                    general_dots_in_ident |
2539 >                    general_stats_i_oper_only |
2540 >                    general_stats_k_oper_only |
2541 >                    general_stats_m_oper_only |
2542 >                    general_stats_o_oper_only |
2543 >                    general_stats_P_oper_only |
2544                      general_stats_u_oper_only |
2545 <                    general_short_motd | general_no_oper_flood |
2546 <                    general_true_no_oper_flood | general_oper_pass_resv |
2547 <                    general_oper_only_umodes | general_max_targets |
2548 <                    general_use_egd | general_egdpool_path |
2549 <                    general_oper_umodes | general_caller_id_wait |
2550 <                    general_opers_bypass_callerid | general_default_floodcount |
2551 <                    general_min_nonwildcard | general_min_nonwildcard_simple |
2552 <                    general_throttle_time | general_havent_read_conf |
2545 >                    general_pace_wait |
2546 >                    general_pace_wait_simple |
2547 >                    general_short_motd |
2548 >                    general_no_oper_flood |
2549 >                    general_oper_pass_resv |
2550 >                    general_oper_only_umodes |
2551 >                    general_max_targets |
2552 >                    general_oper_umodes |
2553 >                    general_caller_id_wait |
2554 >                    general_opers_bypass_callerid |
2555 >                    general_default_floodcount |
2556 >                    general_min_nonwildcard |
2557 >                    general_min_nonwildcard_simple |
2558 >                    general_throttle_count |
2559 >                    general_throttle_time |
2560                      general_ping_cookie |
2561 <                    general_disable_auth |
2562 <                    general_tkline_expire_notices | general_gline_enable |
2563 <                    general_gline_duration | general_gline_request_duration |
2564 <                    general_gline_min_cidr |
2565 <                    general_gline_min_cidr6 |
2566 <                    general_stats_e_disabled |
2567 <                    general_max_watch | general_services_name |
2568 <                    general_cycle_on_host_change |
2569 <                    error;
2561 >                    general_disable_auth |
2562 >                    general_tkline_expire_notices |
2563 >                    general_dline_min_cidr |
2564 >                    general_dline_min_cidr6 |
2565 >                    general_kline_min_cidr |
2566 >                    general_kline_min_cidr6 |
2567 >                    general_stats_e_disabled |
2568 >                    general_max_watch |
2569 >                    general_cycle_on_host_change |
2570 >                    error;
2571  
2572  
2573 < general_max_watch: MAX_WATCH '=' NUMBER ';'
2573 > general_away_count: AWAY_COUNT '=' NUMBER ';'
2574   {
2575 <  ConfigFileEntry.max_watch = $3;
2575 >  ConfigGeneral.away_count = $3;
2576   };
2577  
2578 < general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2578 > general_away_time: AWAY_TIME '=' timespec ';'
2579   {
2580 <  if (conf_parser_ctx.pass == 2)
2464 <    ConfigFileEntry.cycle_on_host_change = yylval.number;
2580 >  ConfigGeneral.away_time = $3;
2581   };
2582  
2583 < general_gline_enable: GLINE_ENABLE '=' TBOOL ';'
2583 > general_max_watch: MAX_WATCH '=' NUMBER ';'
2584   {
2585 <  if (conf_parser_ctx.pass == 2)
2470 <    ConfigFileEntry.glines = yylval.number;
2585 >  ConfigGeneral.max_watch = $3;
2586   };
2587  
2588 < general_gline_duration: GLINE_DURATION '=' timespec ';'
2588 > general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2589   {
2590    if (conf_parser_ctx.pass == 2)
2591 <    ConfigFileEntry.gline_time = $3;
2591 >    ConfigGeneral.cycle_on_host_change = yylval.number;
2592   };
2593  
2594 < general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';'
2594 > general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';'
2595   {
2596 <  if (conf_parser_ctx.pass == 2)
2482 <    ConfigFileEntry.gline_request_time = $3;
2596 >  ConfigGeneral.dline_min_cidr = $3;
2597   };
2598  
2599 < general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';'
2599 > general_dline_min_cidr6: DLINE_MIN_CIDR6 '=' NUMBER ';'
2600   {
2601 <  ConfigFileEntry.gline_min_cidr = $3;
2601 >  ConfigGeneral.dline_min_cidr6 = $3;
2602   };
2603  
2604 < general_gline_min_cidr6: GLINE_MIN_CIDR6 '=' NUMBER ';'
2604 > general_kline_min_cidr: KLINE_MIN_CIDR '=' NUMBER ';'
2605   {
2606 <  ConfigFileEntry.gline_min_cidr6 = $3;
2606 >  ConfigGeneral.kline_min_cidr = $3;
2607   };
2608  
2609 < general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2609 > general_kline_min_cidr6: KLINE_MIN_CIDR6 '=' NUMBER ';'
2610   {
2611 <  ConfigFileEntry.tkline_expire_notices = yylval.number;
2611 >  ConfigGeneral.kline_min_cidr6 = $3;
2612   };
2613  
2614 < general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2614 > general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2615   {
2616 <  ConfigFileEntry.kill_chase_time_limit = $3;
2616 >  ConfigGeneral.tkline_expire_notices = yylval.number;
2617   };
2618  
2619 < general_hide_spoof_ips: HIDE_SPOOF_IPS '=' TBOOL ';'
2619 > general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2620   {
2621 <  ConfigFileEntry.hide_spoof_ips = yylval.number;
2621 >  ConfigGeneral.kill_chase_time_limit = $3;
2622   };
2623  
2624   general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';'
2625   {
2626 <  ConfigFileEntry.ignore_bogus_ts = yylval.number;
2626 >  ConfigGeneral.ignore_bogus_ts = yylval.number;
2627   };
2628  
2629   general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';'
2630   {
2631 <  ConfigFileEntry.failed_oper_notice = yylval.number;
2631 >  ConfigGeneral.failed_oper_notice = yylval.number;
2632   };
2633  
2634   general_anti_nick_flood: ANTI_NICK_FLOOD '=' TBOOL ';'
2635   {
2636 <  ConfigFileEntry.anti_nick_flood = yylval.number;
2636 >  ConfigGeneral.anti_nick_flood = yylval.number;
2637   };
2638  
2639   general_max_nick_time: MAX_NICK_TIME '=' timespec ';'
2640   {
2641 <  ConfigFileEntry.max_nick_time = $3;
2641 >  ConfigGeneral.max_nick_time = $3;
2642   };
2643  
2644   general_max_nick_changes: MAX_NICK_CHANGES '=' NUMBER ';'
2645   {
2646 <  ConfigFileEntry.max_nick_changes = $3;
2646 >  ConfigGeneral.max_nick_changes = $3;
2647   };
2648  
2649   general_max_accept: MAX_ACCEPT '=' NUMBER ';'
2650   {
2651 <  ConfigFileEntry.max_accept = $3;
2651 >  ConfigGeneral.max_accept = $3;
2652   };
2653  
2654   general_anti_spam_exit_message_time: ANTI_SPAM_EXIT_MESSAGE_TIME '=' timespec ';'
2655   {
2656 <  ConfigFileEntry.anti_spam_exit_message_time = $3;
2656 >  ConfigGeneral.anti_spam_exit_message_time = $3;
2657   };
2658  
2659   general_ts_warn_delta: TS_WARN_DELTA '=' timespec ';'
2660   {
2661 <  ConfigFileEntry.ts_warn_delta = $3;
2661 >  ConfigGeneral.ts_warn_delta = $3;
2662   };
2663  
2664   general_ts_max_delta: TS_MAX_DELTA '=' timespec ';'
2665   {
2666    if (conf_parser_ctx.pass == 2)
2667 <    ConfigFileEntry.ts_max_delta = $3;
2667 >    ConfigGeneral.ts_max_delta = $3;
2668   };
2669  
2670 < general_havent_read_conf: HAVENT_READ_CONF '=' NUMBER ';'
2670 > general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2671   {
2672 <  if (($3 > 0) && conf_parser_ctx.pass == 1)
2559 <  {
2560 <    ilog(LOG_TYPE_IRCD, "You haven't read your config file properly.");
2561 <    ilog(LOG_TYPE_IRCD, "There is a line in the example conf that will kill your server if not removed.");
2562 <    ilog(LOG_TYPE_IRCD, "Consider actually reading/editing the conf file, and removing this line.");
2563 <    exit(0);
2564 <  }
2672 >  ConfigGeneral.invisible_on_connect = yylval.number;
2673   };
2674  
2675 < general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2675 > general_warn_no_connect_block: WARN_NO_CONNECT_BLOCK '=' TBOOL ';'
2676   {
2677 <  ConfigFileEntry.invisible_on_connect = yylval.number;
2677 >  ConfigGeneral.warn_no_connect_block = yylval.number;
2678   };
2679  
2680 < general_warn_no_nline: WARN_NO_NLINE '=' TBOOL ';'
2680 > general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2681   {
2682 <  ConfigFileEntry.warn_no_nline = yylval.number;
2682 >  ConfigGeneral.stats_e_disabled = yylval.number;
2683   };
2684  
2685 < general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2685 > general_stats_m_oper_only: STATS_M_OPER_ONLY '=' TBOOL ';'
2686   {
2687 <  ConfigFileEntry.stats_e_disabled = yylval.number;
2687 >  ConfigGeneral.stats_m_oper_only = yylval.number;
2688   };
2689  
2690   general_stats_o_oper_only: STATS_O_OPER_ONLY '=' TBOOL ';'
2691   {
2692 <  ConfigFileEntry.stats_o_oper_only = yylval.number;
2692 >  ConfigGeneral.stats_o_oper_only = yylval.number;
2693   };
2694  
2695   general_stats_P_oper_only: STATS_P_OPER_ONLY '=' TBOOL ';'
2696   {
2697 <  ConfigFileEntry.stats_P_oper_only = yylval.number;
2697 >  ConfigGeneral.stats_P_oper_only = yylval.number;
2698   };
2699  
2700   general_stats_u_oper_only: STATS_U_OPER_ONLY '=' TBOOL ';'
2701   {
2702 <  ConfigFileEntry.stats_u_oper_only = yylval.number;
2702 >  ConfigGeneral.stats_u_oper_only = yylval.number;
2703   };
2704  
2705   general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';'
2706   {
2707 <  ConfigFileEntry.stats_k_oper_only = 2 * yylval.number;
2707 >  ConfigGeneral.stats_k_oper_only = 2 * yylval.number;
2708   } | STATS_K_OPER_ONLY '=' TMASKED ';'
2709   {
2710 <  ConfigFileEntry.stats_k_oper_only = 1;
2710 >  ConfigGeneral.stats_k_oper_only = 1;
2711   };
2712  
2713   general_stats_i_oper_only: STATS_I_OPER_ONLY '=' TBOOL ';'
2714   {
2715 <  ConfigFileEntry.stats_i_oper_only = 2 * yylval.number;
2715 >  ConfigGeneral.stats_i_oper_only = 2 * yylval.number;
2716   } | STATS_I_OPER_ONLY '=' TMASKED ';'
2717   {
2718 <  ConfigFileEntry.stats_i_oper_only = 1;
2718 >  ConfigGeneral.stats_i_oper_only = 1;
2719   };
2720  
2721   general_pace_wait: PACE_WAIT '=' timespec ';'
2722   {
2723 <  ConfigFileEntry.pace_wait = $3;
2723 >  ConfigGeneral.pace_wait = $3;
2724   };
2725  
2726   general_caller_id_wait: CALLER_ID_WAIT '=' timespec ';'
2727   {
2728 <  ConfigFileEntry.caller_id_wait = $3;
2728 >  ConfigGeneral.caller_id_wait = $3;
2729   };
2730  
2731   general_opers_bypass_callerid: OPERS_BYPASS_CALLERID '=' TBOOL ';'
2732   {
2733 <  ConfigFileEntry.opers_bypass_callerid = yylval.number;
2733 >  ConfigGeneral.opers_bypass_callerid = yylval.number;
2734   };
2735  
2736   general_pace_wait_simple: PACE_WAIT_SIMPLE '=' timespec ';'
2737   {
2738 <  ConfigFileEntry.pace_wait_simple = $3;
2738 >  ConfigGeneral.pace_wait_simple = $3;
2739   };
2740  
2741   general_short_motd: SHORT_MOTD '=' TBOOL ';'
2742   {
2743 <  ConfigFileEntry.short_motd = yylval.number;
2636 < };
2637 <  
2638 < general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2639 < {
2640 <  ConfigFileEntry.no_oper_flood = yylval.number;
2743 >  ConfigGeneral.short_motd = yylval.number;
2744   };
2745  
2746 < general_true_no_oper_flood: TRUE_NO_OPER_FLOOD '=' TBOOL ';'
2746 > general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2747   {
2748 <  ConfigFileEntry.true_no_oper_flood = yylval.number;
2748 >  ConfigGeneral.no_oper_flood = yylval.number;
2749   };
2750  
2751   general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';'
2752   {
2753 <  ConfigFileEntry.oper_pass_resv = yylval.number;
2753 >  ConfigGeneral.oper_pass_resv = yylval.number;
2754   };
2755  
2756   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2757   {
2758 <  ConfigFileEntry.dots_in_ident = $3;
2758 >  ConfigGeneral.dots_in_ident = $3;
2759   };
2760  
2761   general_max_targets: MAX_TARGETS '=' NUMBER ';'
2762   {
2763 <  ConfigFileEntry.max_targets = $3;
2661 < };
2662 <
2663 < general_use_egd: USE_EGD '=' TBOOL ';'
2664 < {
2665 <  ConfigFileEntry.use_egd = yylval.number;
2666 < };
2667 <
2668 < general_egdpool_path: EGDPOOL_PATH '=' QSTRING ';'
2669 < {
2670 <  if (conf_parser_ctx.pass == 2)
2671 <  {
2672 <    MyFree(ConfigFileEntry.egdpool_path);
2673 <    ConfigFileEntry.egdpool_path = xstrdup(yylval.string);
2674 <  }
2763 >  ConfigGeneral.max_targets = $3;
2764   };
2765  
2766 < general_services_name: T_SERVICES_NAME '=' QSTRING ';'
2766 > general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2767   {
2768 <  if (conf_parser_ctx.pass == 2 && valid_servname(yylval.string))
2680 <  {
2681 <    MyFree(ConfigFileEntry.service_name);
2682 <    ConfigFileEntry.service_name = xstrdup(yylval.string);
2683 <  }
2768 >  ConfigGeneral.ping_cookie = yylval.number;
2769   };
2770  
2771 < general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2771 > general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2772   {
2773 <  ConfigFileEntry.ping_cookie = yylval.number;
2773 >  ConfigGeneral.disable_auth = yylval.number;
2774   };
2775  
2776 < general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2776 > general_throttle_count: THROTTLE_COUNT '=' NUMBER ';'
2777   {
2778 <  ConfigFileEntry.disable_auth = yylval.number;
2778 >  ConfigGeneral.throttle_count = $3;
2779   };
2780  
2781   general_throttle_time: THROTTLE_TIME '=' timespec ';'
2782   {
2783 <  ConfigFileEntry.throttle_time = yylval.number;
2783 >  ConfigGeneral.throttle_time = $3;
2784   };
2785  
2786   general_oper_umodes: OPER_UMODES
2787   {
2788 <  ConfigFileEntry.oper_umodes = 0;
2788 >  ConfigGeneral.oper_umodes = 0;
2789   } '='  umode_oitems ';' ;
2790  
2791   umode_oitems:    umode_oitems ',' umode_oitem | umode_oitem;
2792   umode_oitem:     T_BOTS
2793   {
2794 <  ConfigFileEntry.oper_umodes |= UMODE_BOTS;
2794 >  ConfigGeneral.oper_umodes |= UMODE_BOTS;
2795   } | T_CCONN
2796   {
2797 <  ConfigFileEntry.oper_umodes |= UMODE_CCONN;
2797 >  ConfigGeneral.oper_umodes |= UMODE_CCONN;
2798   } | T_DEAF
2799   {
2800 <  ConfigFileEntry.oper_umodes |= UMODE_DEAF;
2800 >  ConfigGeneral.oper_umodes |= UMODE_DEAF;
2801   } | T_DEBUG
2802   {
2803 <  ConfigFileEntry.oper_umodes |= UMODE_DEBUG;
2803 >  ConfigGeneral.oper_umodes |= UMODE_DEBUG;
2804   } | T_FULL
2805   {
2806 <  ConfigFileEntry.oper_umodes |= UMODE_FULL;
2806 >  ConfigGeneral.oper_umodes |= UMODE_FULL;
2807   } | HIDDEN
2808   {
2809 <  ConfigFileEntry.oper_umodes |= UMODE_HIDDEN;
2809 >  ConfigGeneral.oper_umodes |= UMODE_HIDDEN;
2810 > } | HIDE_CHANS
2811 > {
2812 >  ConfigGeneral.oper_umodes |= UMODE_HIDECHANS;
2813 > } | HIDE_IDLE
2814 > {
2815 >  ConfigGeneral.oper_umodes |= UMODE_HIDEIDLE;
2816   } | T_SKILL
2817   {
2818 <  ConfigFileEntry.oper_umodes |= UMODE_SKILL;
2818 >  ConfigGeneral.oper_umodes |= UMODE_SKILL;
2819   } | T_NCHANGE
2820   {
2821 <  ConfigFileEntry.oper_umodes |= UMODE_NCHANGE;
2821 >  ConfigGeneral.oper_umodes |= UMODE_NCHANGE;
2822   } | T_REJ
2823   {
2824 <  ConfigFileEntry.oper_umodes |= UMODE_REJ;
2824 >  ConfigGeneral.oper_umodes |= UMODE_REJ;
2825   } | T_UNAUTH
2826   {
2827 <  ConfigFileEntry.oper_umodes |= UMODE_UNAUTH;
2827 >  ConfigGeneral.oper_umodes |= UMODE_UNAUTH;
2828   } | T_SPY
2829   {
2830 <  ConfigFileEntry.oper_umodes |= UMODE_SPY;
2830 >  ConfigGeneral.oper_umodes |= UMODE_SPY;
2831   } | T_EXTERNAL
2832   {
2833 <  ConfigFileEntry.oper_umodes |= UMODE_EXTERNAL;
2743 < } | T_OPERWALL
2744 < {
2745 <  ConfigFileEntry.oper_umodes |= UMODE_OPERWALL;
2833 >  ConfigGeneral.oper_umodes |= UMODE_EXTERNAL;
2834   } | T_SERVNOTICE
2835   {
2836 <  ConfigFileEntry.oper_umodes |= UMODE_SERVNOTICE;
2836 >  ConfigGeneral.oper_umodes |= UMODE_SERVNOTICE;
2837   } | T_INVISIBLE
2838   {
2839 <  ConfigFileEntry.oper_umodes |= UMODE_INVISIBLE;
2839 >  ConfigGeneral.oper_umodes |= UMODE_INVISIBLE;
2840   } | T_WALLOP
2841   {
2842 <  ConfigFileEntry.oper_umodes |= UMODE_WALLOP;
2842 >  ConfigGeneral.oper_umodes |= UMODE_WALLOP;
2843   } | T_SOFTCALLERID
2844   {
2845 <  ConfigFileEntry.oper_umodes |= UMODE_SOFTCALLERID;
2845 >  ConfigGeneral.oper_umodes |= UMODE_SOFTCALLERID;
2846   } | T_CALLERID
2847   {
2848 <  ConfigFileEntry.oper_umodes |= UMODE_CALLERID;
2848 >  ConfigGeneral.oper_umodes |= UMODE_CALLERID;
2849   } | T_LOCOPS
2850   {
2851 <  ConfigFileEntry.oper_umodes |= UMODE_LOCOPS;
2851 >  ConfigGeneral.oper_umodes |= UMODE_LOCOPS;
2852   } | T_NONONREG
2853   {
2854 <  ConfigFileEntry.oper_umodes |= UMODE_REGONLY;
2854 >  ConfigGeneral.oper_umodes |= UMODE_REGONLY;
2855   } | T_FARCONNECT
2856   {
2857 <  ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT;
2857 >  ConfigGeneral.oper_umodes |= UMODE_FARCONNECT;
2858   };
2859  
2860 < general_oper_only_umodes: OPER_ONLY_UMODES
2860 > general_oper_only_umodes: OPER_ONLY_UMODES
2861   {
2862 <  ConfigFileEntry.oper_only_umodes = 0;
2862 >  ConfigGeneral.oper_only_umodes = 0;
2863   } '='  umode_items ';' ;
2864  
2865 < umode_items:    umode_items ',' umode_item | umode_item;
2866 < umode_item:     T_BOTS
2865 > umode_items:  umode_items ',' umode_item | umode_item;
2866 > umode_item:   T_BOTS
2867   {
2868 <  ConfigFileEntry.oper_only_umodes |= UMODE_BOTS;
2868 >  ConfigGeneral.oper_only_umodes |= UMODE_BOTS;
2869   } | T_CCONN
2870   {
2871 <  ConfigFileEntry.oper_only_umodes |= UMODE_CCONN;
2871 >  ConfigGeneral.oper_only_umodes |= UMODE_CCONN;
2872   } | T_DEAF
2873   {
2874 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEAF;
2874 >  ConfigGeneral.oper_only_umodes |= UMODE_DEAF;
2875   } | T_DEBUG
2876   {
2877 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEBUG;
2877 >  ConfigGeneral.oper_only_umodes |= UMODE_DEBUG;
2878   } | T_FULL
2879 < {
2880 <  ConfigFileEntry.oper_only_umodes |= UMODE_FULL;
2879 > {
2880 >  ConfigGeneral.oper_only_umodes |= UMODE_FULL;
2881   } | T_SKILL
2882   {
2883 <  ConfigFileEntry.oper_only_umodes |= UMODE_SKILL;
2883 >  ConfigGeneral.oper_only_umodes |= UMODE_SKILL;
2884   } | HIDDEN
2885   {
2886 <  ConfigFileEntry.oper_only_umodes |= UMODE_HIDDEN;
2886 >  ConfigGeneral.oper_only_umodes |= UMODE_HIDDEN;
2887   } | T_NCHANGE
2888   {
2889 <  ConfigFileEntry.oper_only_umodes |= UMODE_NCHANGE;
2889 >  ConfigGeneral.oper_only_umodes |= UMODE_NCHANGE;
2890   } | T_REJ
2891   {
2892 <  ConfigFileEntry.oper_only_umodes |= UMODE_REJ;
2892 >  ConfigGeneral.oper_only_umodes |= UMODE_REJ;
2893   } | T_UNAUTH
2894   {
2895 <  ConfigFileEntry.oper_only_umodes |= UMODE_UNAUTH;
2895 >  ConfigGeneral.oper_only_umodes |= UMODE_UNAUTH;
2896   } | T_SPY
2897   {
2898 <  ConfigFileEntry.oper_only_umodes |= UMODE_SPY;
2898 >  ConfigGeneral.oper_only_umodes |= UMODE_SPY;
2899   } | T_EXTERNAL
2900   {
2901 <  ConfigFileEntry.oper_only_umodes |= UMODE_EXTERNAL;
2814 < } | T_OPERWALL
2815 < {
2816 <  ConfigFileEntry.oper_only_umodes |= UMODE_OPERWALL;
2901 >  ConfigGeneral.oper_only_umodes |= UMODE_EXTERNAL;
2902   } | T_SERVNOTICE
2903   {
2904 <  ConfigFileEntry.oper_only_umodes |= UMODE_SERVNOTICE;
2904 >  ConfigGeneral.oper_only_umodes |= UMODE_SERVNOTICE;
2905   } | T_INVISIBLE
2906   {
2907 <  ConfigFileEntry.oper_only_umodes |= UMODE_INVISIBLE;
2907 >  ConfigGeneral.oper_only_umodes |= UMODE_INVISIBLE;
2908   } | T_WALLOP
2909   {
2910 <  ConfigFileEntry.oper_only_umodes |= UMODE_WALLOP;
2910 >  ConfigGeneral.oper_only_umodes |= UMODE_WALLOP;
2911   } | T_SOFTCALLERID
2912   {
2913 <  ConfigFileEntry.oper_only_umodes |= UMODE_SOFTCALLERID;
2913 >  ConfigGeneral.oper_only_umodes |= UMODE_SOFTCALLERID;
2914   } | T_CALLERID
2915   {
2916 <  ConfigFileEntry.oper_only_umodes |= UMODE_CALLERID;
2916 >  ConfigGeneral.oper_only_umodes |= UMODE_CALLERID;
2917   } | T_LOCOPS
2918   {
2919 <  ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS;
2919 >  ConfigGeneral.oper_only_umodes |= UMODE_LOCOPS;
2920   } | T_NONONREG
2921   {
2922 <  ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
2922 >  ConfigGeneral.oper_only_umodes |= UMODE_REGONLY;
2923   } | T_FARCONNECT
2924   {
2925 <  ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT;
2925 >  ConfigGeneral.oper_only_umodes |= UMODE_FARCONNECT;
2926   };
2927  
2928   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
2929   {
2930 <  ConfigFileEntry.min_nonwildcard = $3;
2930 >  ConfigGeneral.min_nonwildcard = $3;
2931   };
2932  
2933   general_min_nonwildcard_simple: MIN_NONWILDCARD_SIMPLE '=' NUMBER ';'
2934   {
2935 <  ConfigFileEntry.min_nonwildcard_simple = $3;
2935 >  ConfigGeneral.min_nonwildcard_simple = $3;
2936   };
2937  
2938   general_default_floodcount: DEFAULT_FLOODCOUNT '=' NUMBER ';'
2939   {
2940 <  ConfigFileEntry.default_floodcount = $3;
2940 >  ConfigGeneral.default_floodcount = $3;
2941   };
2942  
2943  
# Line 2864 | Line 2949 | channel_entry: CHANNEL
2949  
2950   channel_items:      channel_items channel_item | channel_item;
2951   channel_item:       channel_max_bans |
2952 <                    channel_knock_delay | channel_knock_delay_channel |
2953 <                    channel_max_chans_per_user | channel_max_chans_per_oper |
2954 <                    channel_default_split_user_count |
2955 <                    channel_default_split_server_count |
2956 <                    channel_no_create_on_split |
2957 <                    channel_no_join_on_split |
2958 <                    channel_jflood_count | channel_jflood_time |
2959 <                    channel_disable_fake_channels | error;
2952 >                    channel_invite_client_count |
2953 >                    channel_invite_client_time |
2954 >                    channel_knock_client_count |
2955 >                    channel_knock_client_time |
2956 >                    channel_knock_delay_channel |
2957 >                    channel_max_channels |
2958 >                    channel_default_join_flood_count |
2959 >                    channel_default_join_flood_time |
2960 >                    channel_disable_fake_channels |
2961 >                    error;
2962  
2963   channel_disable_fake_channels: DISABLE_FAKE_CHANNELS '=' TBOOL ';'
2964   {
2965    ConfigChannel.disable_fake_channels = yylval.number;
2966   };
2967  
2968 < channel_knock_delay: KNOCK_DELAY '=' timespec ';'
2882 < {
2883 <  ConfigChannel.knock_delay = $3;
2884 < };
2885 <
2886 < channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2968 > channel_invite_client_count: INVITE_CLIENT_COUNT '=' NUMBER ';'
2969   {
2970 <  ConfigChannel.knock_delay_channel = $3;
2970 >  ConfigChannel.invite_client_count = $3;
2971   };
2972  
2973 < channel_max_chans_per_user: MAX_CHANS_PER_USER '=' NUMBER ';'
2973 > channel_invite_client_time: INVITE_CLIENT_TIME '=' timespec ';'
2974   {
2975 <  ConfigChannel.max_chans_per_user = $3;
2975 >  ConfigChannel.invite_client_time = $3;
2976   };
2977  
2978 < channel_max_chans_per_oper: MAX_CHANS_PER_OPER '=' NUMBER ';'
2978 > channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2979   {
2980 <  ConfigChannel.max_chans_per_oper = $3;
2980 >  ConfigChannel.knock_client_count = $3;
2981   };
2982  
2983 < channel_max_bans: MAX_BANS '=' NUMBER ';'
2983 > channel_knock_client_time: KNOCK_CLIENT_TIME '=' timespec ';'
2984   {
2985 <  ConfigChannel.max_bans = $3;
2985 >  ConfigChannel.knock_client_time = $3;
2986   };
2987  
2988 < channel_default_split_user_count: DEFAULT_SPLIT_USER_COUNT '=' NUMBER ';'
2907 < {
2908 <  ConfigChannel.default_split_user_count = $3;
2909 < };
2910 <
2911 < channel_default_split_server_count: DEFAULT_SPLIT_SERVER_COUNT '=' NUMBER ';'
2988 > channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2989   {
2990 <  ConfigChannel.default_split_server_count = $3;
2990 >  ConfigChannel.knock_delay_channel = $3;
2991   };
2992  
2993 < channel_no_create_on_split: NO_CREATE_ON_SPLIT '=' TBOOL ';'
2993 > channel_max_channels: MAX_CHANNELS '=' NUMBER ';'
2994   {
2995 <  ConfigChannel.no_create_on_split = yylval.number;
2995 >  ConfigChannel.max_channels = $3;
2996   };
2997  
2998 < channel_no_join_on_split: NO_JOIN_ON_SPLIT '=' TBOOL ';'
2998 > channel_max_bans: MAX_BANS '=' NUMBER ';'
2999   {
3000 <  ConfigChannel.no_join_on_split = yylval.number;
3000 >  ConfigChannel.max_bans = $3;
3001   };
3002  
3003 < channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';'
3003 > channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';'
3004   {
3005 <  GlobalSetOptions.joinfloodcount = yylval.number;
3005 >  ConfigChannel.default_join_flood_count = yylval.number;
3006   };
3007  
3008 < channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';'
3008 > channel_default_join_flood_time: DEFAULT_JOIN_FLOOD_TIME '=' timespec ';'
3009   {
3010 <  GlobalSetOptions.joinfloodtime = yylval.number;
3010 >  ConfigChannel.default_join_flood_time = $3;
3011   };
3012  
3013   /***************************************************************************
# Line 2940 | Line 3017 | serverhide_entry: SERVERHIDE
3017    '{' serverhide_items '}' ';';
3018  
3019   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
3020 < serverhide_item:    serverhide_flatten_links | serverhide_disable_remote_commands |
3020 > serverhide_item:    serverhide_flatten_links |
3021 >                    serverhide_disable_remote_commands |
3022                      serverhide_hide_servers |
3023 <                    serverhide_hide_services |
3024 <                    serverhide_links_delay |
3025 <                    serverhide_hidden | serverhide_hidden_name |
3026 <                    serverhide_hide_server_ips |
3023 >                    serverhide_hide_services |
3024 >                    serverhide_links_delay |
3025 >                    serverhide_hidden |
3026 >                    serverhide_hidden_name |
3027 >                    serverhide_hide_server_ips |
3028                      error;
3029  
3030   serverhide_flatten_links: FLATTEN_LINKS '=' TBOOL ';'
# Line 2987 | Line 3066 | serverhide_links_delay: LINKS_DELAY '='
3066    {
3067      if (($3 > 0) && ConfigServerHide.links_disabled == 1)
3068      {
3069 <      eventAddIsh("write_links_file", write_links_file, NULL, $3);
3069 >      event_write_links_file.when = $3;
3070 >      event_addish(&event_write_links_file, NULL);
3071        ConfigServerHide.links_disabled = 0;
3072      }
3073  

Diff Legend

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