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 3762 by michael, Sun Jun 1 19:35:16 2014 UTC vs.
Revision 8792 by michael, Thu Jan 17 18:35:32 2019 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 2000-2014 ircd-hybrid development team
4 > *  Copyright (c) 2000-2019 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 15 | 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
20   */
21  
# Line 27 | Line 27
27  
28   %{
29  
30 #define YY_NO_UNPUT
31 #include <sys/types.h>
32 #include <string.h>
33
30   #include "config.h"
31   #include "stdinc.h"
32   #include "ircd.h"
33   #include "list.h"
34 + #include "parse.h"
35   #include "conf.h"
36   #include "conf_class.h"
37 + #include "conf_cluster.h"
38 + #include "conf_gecos.h"
39 + #include "conf_pseudo.h"
40 + #include "conf_resv.h"
41 + #include "conf_service.h"
42 + #include "conf_shared.h"
43   #include "event.h"
44 + #include "id.h"
45   #include "log.h"
42 #include "client.h"     /* for UMODE_ALL only */
46   #include "irc_string.h"
47   #include "memory.h"
48   #include "modules.h"
49   #include "server.h"
50   #include "hostmask.h"
48 #include "send.h"
51   #include "listener.h"
50 #include "resv.h"
51 #include "numeric.h"
52   #include "user.h"
53   #include "motd.h"
54  
55 #ifdef HAVE_LIBCRYPTO
56 #include <openssl/rsa.h>
57 #include <openssl/bio.h>
58 #include <openssl/pem.h>
59 #include <openssl/dh.h>
60 #endif
61
62 #include "rsa.h"
63
55   int yylex(void);
56  
57   static struct
# Line 76 | Line 67 | static struct
67    {
68      char buf[IRCD_BUFSIZE];
69    } name,
70 +    nick,
71      user,
72      host,
73      addr,
# Line 85 | Line 77 | static struct
77      cert,
78      rpass,
79      spass,
80 <    class;
80 >    whois,
81 >    class,
82 >    target,
83 >    prepend,
84 >    command;
85  
86    struct
87    {
# Line 97 | Line 93 | static struct
93      port,
94      aftype,
95      ping_freq,
96 <    max_perip,
96 >    max_perip_local,
97 >    max_perip_global,
98      con_freq,
99      min_idle,
100      max_idle,
101      max_total,
105    max_global,
106    max_local,
107    max_ident,
102      max_sendq,
103      max_recvq,
104 +    max_channels,
105      cidr_bitlen_ipv4,
106      cidr_bitlen_ipv6,
107      number_per_cidr;
# Line 115 | Line 110 | static struct
110   static void
111   reset_block_state(void)
112   {
113 <  dlink_node *ptr = NULL, *ptr_next = NULL;
113 >  dlink_node *node = NULL, *node_next = NULL;
114  
115 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.mask.list.head)
115 >  DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head)
116    {
117 <    MyFree(ptr->data);
118 <    dlinkDelete(ptr, &block_state.mask.list);
119 <    free_dlink_node(ptr);
117 >    xfree(node->data);
118 >    dlinkDelete(node, &block_state.mask.list);
119 >    free_dlink_node(node);
120    }
121  
122 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.leaf.list.head)
122 >  DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head)
123    {
124 <    MyFree(ptr->data);
125 <    dlinkDelete(ptr, &block_state.leaf.list);
126 <    free_dlink_node(ptr);
124 >    xfree(node->data);
125 >    dlinkDelete(node, &block_state.leaf.list);
126 >    free_dlink_node(node);
127    }
128  
129 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.hub.list.head)
129 >  DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head)
130    {
131 <    MyFree(ptr->data);
132 <    dlinkDelete(ptr, &block_state.hub.list);
133 <    free_dlink_node(ptr);
131 >    xfree(node->data);
132 >    dlinkDelete(node, &block_state.hub.list);
133 >    free_dlink_node(node);
134    }
135  
136    memset(&block_state, 0, sizeof(block_state));
# Line 154 | Line 149 | reset_block_state(void)
149   %token  ANTI_NICK_FLOOD
150   %token  ANTI_SPAM_EXIT_MESSAGE_TIME
151   %token  AUTOCONN
152 + %token  AWAY_COUNT
153 + %token  AWAY_TIME
154   %token  BYTES KBYTES MBYTES
155   %token  CALLER_ID_WAIT
156   %token  CAN_FLOOD
# Line 161 | Line 158 | reset_block_state(void)
158   %token  CIDR_BITLEN_IPV4
159   %token  CIDR_BITLEN_IPV6
160   %token  CLASS
161 + %token  CLOSE
162   %token  CONNECT
163   %token  CONNECTFREQ
164   %token  CYCLE_ON_HOST_CHANGE
165   %token  DEFAULT_FLOODCOUNT
166 < %token  DEFAULT_SPLIT_SERVER_COUNT
167 < %token  DEFAULT_SPLIT_USER_COUNT
166 > %token  DEFAULT_FLOODTIME
167 > %token  DEFAULT_JOIN_FLOOD_COUNT
168 > %token  DEFAULT_JOIN_FLOOD_TIME
169 > %token  DEFAULT_MAX_CLIENTS
170   %token  DENY
171   %token  DESCRIPTION
172   %token  DIE
173   %token  DISABLE_AUTH
174   %token  DISABLE_FAKE_CHANNELS
175   %token  DISABLE_REMOTE_COMMANDS
176 + %token  DLINE_MIN_CIDR
177 + %token  DLINE_MIN_CIDR6
178   %token  DOTS_IN_IDENT
177 %token  EGDPOOL_PATH
179   %token  EMAIL
180   %token  ENCRYPTED
181   %token  EXCEED_LIMIT
182   %token  EXEMPT
183   %token  FAILED_OPER_NOTICE
184   %token  FLATTEN_LINKS
185 + %token  FLATTEN_LINKS_DELAY
186 + %token  FLATTEN_LINKS_FILE
187   %token  GECOS
188   %token  GENERAL
186 %token  GLINE
187 %token  GLINE_DURATION
188 %token  GLINE_ENABLE
189 %token  GLINE_EXEMPT
190 %token  GLINE_MIN_CIDR
191 %token  GLINE_MIN_CIDR6
192 %token  GLINE_REQUEST_DURATION
193 %token  GLOBAL_KILL
194 %token  HAVENT_READ_CONF
189   %token  HIDDEN
190   %token  HIDDEN_NAME
191   %token  HIDE_CHANS
# Line 200 | Line 194 | reset_block_state(void)
194   %token  HIDE_SERVER_IPS
195   %token  HIDE_SERVERS
196   %token  HIDE_SERVICES
203 %token  HIDE_SPOOF_IPS
197   %token  HOST
198   %token  HUB
199   %token  HUB_MASK
207 %token  IGNORE_BOGUS_TS
200   %token  INVISIBLE_ON_CONNECT
201 < %token  INVITE_DELAY
201 > %token  INVITE_CLIENT_COUNT
202 > %token  INVITE_CLIENT_TIME
203   %token  INVITE_DELAY_CHANNEL
204 + %token  INVITE_EXPIRE_TIME
205   %token  IP
206   %token  IRCD_AUTH
207   %token  IRCD_FLAGS
208   %token  IRCD_SID
209 < %token  JOIN_FLOOD_COUNT
216 < %token  JOIN_FLOOD_TIME
209 > %token  JOIN
210   %token  KILL
211   %token  KILL_CHASE_TIME_LIMIT
212   %token  KLINE
213   %token  KLINE_EXEMPT
214 < %token  KNOCK_DELAY
214 > %token  KLINE_MIN_CIDR
215 > %token  KLINE_MIN_CIDR6
216 > %token  KNOCK_CLIENT_COUNT
217 > %token  KNOCK_CLIENT_TIME
218   %token  KNOCK_DELAY_CHANNEL
219   %token  LEAF_MASK
224 %token  LINKS_DELAY
220   %token  LISTEN
221   %token  MASK
222   %token  MAX_ACCEPT
223   %token  MAX_BANS
224 < %token  MAX_CHANS_PER_OPER
225 < %token  MAX_CHANS_PER_USER
231 < %token  MAX_GLOBAL
232 < %token  MAX_IDENT
224 > %token  MAX_BANS_LARGE
225 > %token  MAX_CHANNELS
226   %token  MAX_IDLE
227 < %token  MAX_LOCAL
227 > %token  MAX_INVITES
228   %token  MAX_NICK_CHANGES
229   %token  MAX_NICK_LENGTH
230   %token  MAX_NICK_TIME
# Line 251 | Line 244 | reset_block_state(void)
244   %token  NETWORK_DESC
245   %token  NETWORK_NAME
246   %token  NICK
254 %token  NO_CREATE_ON_SPLIT
255 %token  NO_JOIN_ON_SPLIT
247   %token  NO_OPER_FLOOD
248   %token  NO_TILDE
249   %token  NUMBER
250   %token  NUMBER_PER_CIDR
251 < %token  NUMBER_PER_IP
251 > %token  NUMBER_PER_IP_GLOBAL
252 > %token  NUMBER_PER_IP_LOCAL
253   %token  OPER_ONLY_UMODES
262 %token  OPER_PASS_RESV
254   %token  OPER_UMODES
255   %token  OPERATOR
256   %token  OPERS_BYPASS_CALLERID
# Line 281 | Line 272 | reset_block_state(void)
272   %token  RESV
273   %token  RESV_EXEMPT
274   %token  RSA_PRIVATE_KEY_FILE
284 %token  RSA_PUBLIC_KEY_FILE
275   %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS
276   %token  SEND_PASSWORD
277   %token  SENDQ
# Line 294 | Line 284 | reset_block_state(void)
284   %token  SSL_CERTIFICATE_FILE
285   %token  SSL_CERTIFICATE_FINGERPRINT
286   %token  SSL_CONNECTION_REQUIRED
287 + %token  SSL_DH_ELLIPTIC_CURVE
288   %token  SSL_DH_PARAM_FILE
289 + %token  SSL_MESSAGE_DIGEST_ALGORITHM
290   %token  STATS_E_DISABLED
291   %token  STATS_I_OPER_ONLY
292   %token  STATS_K_OPER_ONLY
293 + %token  STATS_M_OPER_ONLY
294   %token  STATS_O_OPER_ONLY
295   %token  STATS_P_OPER_ONLY
296   %token  STATS_U_OPER_ONLY
# Line 305 | Line 298 | reset_block_state(void)
298   %token  T_BOTS
299   %token  T_CALLERID
300   %token  T_CCONN
301 + %token  T_COMMAND
302   %token  T_CLUSTER
303   %token  T_DEAF
304   %token  T_DEBUG
# Line 319 | Line 313 | reset_block_state(void)
313   %token  T_IPV6
314   %token  T_LOCOPS
315   %token  T_LOG
322 %token  T_MAX_CLIENTS
316   %token  T_NCHANGE
317   %token  T_NONONREG
318 < %token  T_OPERWALL
318 > %token  T_OPME
319 > %token  T_PREPEND
320 > %token  T_PSEUDO
321   %token  T_RECVQ
322   %token  T_REJ
323   %token  T_RESTART
324   %token  T_SERVER
325   %token  T_SERVICE
331 %token  T_SERVICES_NAME
326   %token  T_SERVNOTICE
327   %token  T_SET
328   %token  T_SHARED
# Line 338 | Line 332 | reset_block_state(void)
332   %token  T_SPY
333   %token  T_SSL
334   %token  T_SSL_CIPHER_LIST
335 < %token  T_SSL_CLIENT_METHOD
342 < %token  T_SSL_SERVER_METHOD
343 < %token  T_SSLV3
344 < %token  T_TLSV1
335 > %token  T_TARGET
336   %token  T_UMODES
337   %token  T_UNAUTH
338   %token  T_UNDLINE
# Line 352 | Line 343 | reset_block_state(void)
343   %token  T_WALLOPS
344   %token  T_WEBIRC
345   %token  TBOOL
346 + %token  THROTTLE_COUNT
347   %token  THROTTLE_TIME
348   %token  TKLINE_EXPIRE_NOTICES
349   %token  TMASKED
358 %token  TRUE_NO_OPER_FLOOD
350   %token  TS_MAX_DELTA
351   %token  TS_WARN_DELTA
352   %token  TWODOTS
353   %token  TYPE
354   %token  UNKLINE
364 %token  USE_EGD
355   %token  USE_LOGGING
356   %token  USER
357   %token  VHOST
358   %token  VHOST6
359   %token  WARN_NO_CONNECT_BLOCK
360 + %token  WHOIS
361 + %token  WHOWAS_HISTORY_LENGTH
362   %token  XLINE
363 + %token  XLINE_EXEMPT
364  
365   %type  <string> QSTRING
366   %type  <number> NUMBER
# Line 402 | Line 395 | conf_item:        admin_entry
395                  | gecos_entry
396                  | modules_entry
397                  | motd_entry
398 +                | pseudo_entry
399                  | error ';'
400                  | error '}'
401          ;
# Line 427 | Line 421 | sizespec:   NUMBER sizespec_ { $$ = $1 +
421  
422  
423   /***************************************************************************
424 < *  section modules
424 > * modules {} section
425   ***************************************************************************/
426 < modules_entry: MODULES
433 <  '{' modules_items '}' ';';
426 > modules_entry: MODULES '{' modules_items '}' ';';
427  
428   modules_items:  modules_items modules_item | modules_item;
429   modules_item:   modules_module | modules_path | error ';' ;
# Line 448 | Line 441 | modules_path: PATH '=' QSTRING ';'
441   };
442  
443  
444 + /***************************************************************************
445 + * serverinfo {}  section
446 + ***************************************************************************/
447   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
448  
449   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
# Line 457 | Line 453 | serverinfo_item:        serverinfo_name
453                          serverinfo_description |
454                          serverinfo_network_name |
455                          serverinfo_network_desc |
456 <                        serverinfo_max_clients |
456 >                        serverinfo_default_max_clients |
457                          serverinfo_max_nick_length |
458                          serverinfo_max_topic_length |
459                          serverinfo_ssl_dh_param_file |
460 +                        serverinfo_ssl_dh_elliptic_curve |
461                          serverinfo_rsa_private_key_file |
462                          serverinfo_vhost6 |
463                          serverinfo_sid |
464                          serverinfo_ssl_certificate_file |
468                        serverinfo_ssl_client_method |
469                        serverinfo_ssl_server_method |
465                          serverinfo_ssl_cipher_list |
466 +                        serverinfo_ssl_message_digest_algorithm |
467                          error ';' ;
468  
469  
474 serverinfo_ssl_client_method: T_SSL_CLIENT_METHOD '=' client_method_types ';' ;
475 serverinfo_ssl_server_method: T_SSL_SERVER_METHOD '=' server_method_types ';' ;
476
477 client_method_types: client_method_types ',' client_method_type_item | client_method_type_item;
478 client_method_type_item: T_SSLV3
479 {
480 #ifdef HAVE_LIBCRYPTO
481  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
482    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv3);
483 #endif
484 } | T_TLSV1
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_TLSv1);
489 #endif
490 };
491
492 server_method_types: server_method_types ',' server_method_type_item | server_method_type_item;
493 server_method_type_item: T_SSLV3
494 {
495 #ifdef HAVE_LIBCRYPTO
496  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
497    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3);
498 #endif
499 } | T_TLSV1
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_TLSv1);
504 #endif
505 };
506
470   serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
471   {
472 < #ifdef HAVE_LIBCRYPTO
510 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
472 >  if (conf_parser_ctx.pass == 2)
473    {
474 <    if (!ServerInfo.rsa_private_key_file)
475 <    {
514 <      conf_error_report("No rsa_private_key_file specified, SSL disabled");
515 <      break;
516 <    }
517 <
518 <    if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string,
519 <                                     SSL_FILETYPE_PEM) <= 0 ||
520 <        SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string,
521 <                                     SSL_FILETYPE_PEM) <= 0)
522 <    {
523 <      report_crypto_errors();
524 <      conf_error_report("Could not open/read certificate file");
525 <      break;
526 <    }
527 <
528 <    if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file,
529 <                                    SSL_FILETYPE_PEM) <= 0 ||
530 <        SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file,
531 <                                    SSL_FILETYPE_PEM) <= 0)
532 <    {
533 <      report_crypto_errors();
534 <      conf_error_report("Could not read RSA private key");
535 <      break;
536 <    }
537 <
538 <    if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) ||
539 <        !SSL_CTX_check_private_key(ServerInfo.client_ctx))
540 <    {
541 <      report_crypto_errors();
542 <      conf_error_report("Could not read RSA private key");
543 <      break;
544 <    }
474 >    xfree(ConfigServerInfo.ssl_certificate_file);
475 >    ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string);
476    }
546 #endif
477   };
478  
479   serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';'
480   {
481 < #ifdef HAVE_LIBCRYPTO
552 <  BIO *file = NULL;
553 <
554 <  if (conf_parser_ctx.pass != 1)
555 <    break;
556 <
557 <  if (ServerInfo.rsa_private_key)
558 <  {
559 <    RSA_free(ServerInfo.rsa_private_key);
560 <    ServerInfo.rsa_private_key = NULL;
561 <  }
562 <
563 <  if (ServerInfo.rsa_private_key_file)
564 <  {
565 <    MyFree(ServerInfo.rsa_private_key_file);
566 <    ServerInfo.rsa_private_key_file = NULL;
567 <  }
568 <
569 <  ServerInfo.rsa_private_key_file = xstrdup(yylval.string);
570 <
571 <  if ((file = BIO_new_file(yylval.string, "r")) == NULL)
572 <  {
573 <    conf_error_report("File open failed, ignoring");
574 <    break;
575 <  }
576 <
577 <  ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
578 <
579 <  BIO_set_close(file, BIO_CLOSE);
580 <  BIO_free(file);
581 <
582 <  if (ServerInfo.rsa_private_key == NULL)
481 >  if (conf_parser_ctx.pass == 2)
482    {
483 <    conf_error_report("Couldn't extract key, ignoring");
484 <    break;
483 >    xfree(ConfigServerInfo.rsa_private_key_file);
484 >    ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
485    }
486 + };
487  
488 <  if (!RSA_check_key(ServerInfo.rsa_private_key))
488 > serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
489 > {
490 >  if (conf_parser_ctx.pass == 2)
491    {
492 <    RSA_free(ServerInfo.rsa_private_key);
493 <    ServerInfo.rsa_private_key = NULL;
592 <
593 <    conf_error_report("Invalid key, ignoring");
594 <    break;
492 >    xfree(ConfigServerInfo.ssl_dh_param_file);
493 >    ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string);
494    }
495 + };
496  
497 <  if (RSA_size(ServerInfo.rsa_private_key) < 128)
497 > serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
498 > {
499 >  if (conf_parser_ctx.pass == 2)
500    {
501 <    RSA_free(ServerInfo.rsa_private_key);
502 <    ServerInfo.rsa_private_key = NULL;
601 <
602 <    conf_error_report("Ignoring serverinfo::rsa_private_key_file -- need at least a 1024 bit key size");
501 >    xfree(ConfigServerInfo.ssl_cipher_list);
502 >    ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string);
503    }
604 #endif
504   };
505  
506 < serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
506 > serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
507   {
508 < /* TBD - XXX: error reporting */
610 < #ifdef HAVE_LIBCRYPTO
611 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
508 >  if (conf_parser_ctx.pass == 2)
509    {
510 <    BIO *file = BIO_new_file(yylval.string, "r");
511 <
615 <    if (file)
616 <    {
617 <      DH *dh = PEM_read_bio_DHparams(file, NULL, NULL, NULL);
618 <
619 <      BIO_free(file);
620 <
621 <      if (dh)
622 <      {
623 <        if (DH_size(dh) < 128)
624 <          conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
625 <        else
626 <          SSL_CTX_set_tmp_dh(ServerInfo.server_ctx, dh);
627 <
628 <        DH_free(dh);
629 <      }
630 <    }
510 >    xfree(ConfigServerInfo.ssl_message_digest_algorithm);
511 >    ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string);
512    }
513 < #endif
633 < };
513 > }
514  
515 < serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
515 > serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
516   {
517 < #ifdef HAVE_LIBCRYPTO
518 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
519 <    SSL_CTX_set_cipher_list(ServerInfo.server_ctx, yylval.string);
520 < #endif
517 >  if (conf_parser_ctx.pass == 2)
518 >  {
519 >    xfree(ConfigServerInfo.ssl_dh_elliptic_curve);
520 >    ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string);
521 >  }
522   };
523  
524   serverinfo_name: NAME '=' QSTRING ';'
525   {
526 <  /* this isn't rehashable */
527 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.name)
526 >  /* This isn't rehashable */
527 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
528    {
529 <    if (valid_servname(yylval.string))
530 <      ServerInfo.name = xstrdup(yylval.string);
529 >    if (server_valid_name(yylval.string) == true)
530 >      ConfigServerInfo.name = xstrdup(yylval.string);
531      else
532      {
533        conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
534 <      exit(0);
534 >      exit(EXIT_FAILURE);
535      }
536    }
537   };
538  
539   serverinfo_sid: IRCD_SID '=' QSTRING ';'
540   {
541 <  /* this isn't rehashable */
542 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.sid)
541 >  /* This isn't rehashable */
542 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
543    {
544      if (valid_sid(yylval.string))
545 <      ServerInfo.sid = xstrdup(yylval.string);
545 >      ConfigServerInfo.sid = xstrdup(yylval.string);
546      else
547      {
548        conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
549 <      exit(0);
549 >      exit(EXIT_FAILURE);
550      }
551    }
552   };
# Line 674 | Line 555 | serverinfo_description: DESCRIPTION '='
555   {
556    if (conf_parser_ctx.pass == 2)
557    {
558 <    MyFree(ServerInfo.description);
559 <    ServerInfo.description = xstrdup(yylval.string);
558 >    xfree(ConfigServerInfo.description);
559 >    ConfigServerInfo.description = xstrdup(yylval.string);
560 >    strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info));
561    }
562   };
563  
# Line 686 | Line 568 | serverinfo_network_name: NETWORK_NAME '=
568      char *p;
569  
570      if ((p = strchr(yylval.string, ' ')))
571 <      p = '\0';
571 >      *p = '\0';
572  
573 <    MyFree(ServerInfo.network_name);
574 <    ServerInfo.network_name = xstrdup(yylval.string);
573 >    xfree(ConfigServerInfo.network_name);
574 >    ConfigServerInfo.network_name = xstrdup(yylval.string);
575    }
576   };
577  
# Line 698 | Line 580 | serverinfo_network_desc: NETWORK_DESC '=
580    if (conf_parser_ctx.pass != 2)
581      break;
582  
583 <  MyFree(ServerInfo.network_desc);
584 <  ServerInfo.network_desc = xstrdup(yylval.string);
583 >  xfree(ConfigServerInfo.network_desc);
584 >  ConfigServerInfo.network_desc = xstrdup(yylval.string);
585   };
586  
587   serverinfo_vhost: VHOST '=' QSTRING ';'
# Line 720 | Line 602 | serverinfo_vhost: VHOST '=' QSTRING ';'
602      {
603        assert(res);
604  
605 <      memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen);
606 <      ServerInfo.ip.ss.ss_family = res->ai_family;
607 <      ServerInfo.ip.ss_len = res->ai_addrlen;
605 >      memcpy(&ConfigServerInfo.ip, res->ai_addr, res->ai_addrlen);
606 >      ConfigServerInfo.ip.ss.ss_family = res->ai_family;
607 >      ConfigServerInfo.ip.ss_len = res->ai_addrlen;
608        freeaddrinfo(res);
609  
610 <      ServerInfo.specific_ipv4_vhost = 1;
610 >      ConfigServerInfo.specific_ipv4_vhost = 1;
611      }
612    }
613   };
614  
615   serverinfo_vhost6: VHOST6 '=' QSTRING ';'
616   {
735 #ifdef IPV6
617    if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
618    {
619      struct addrinfo hints, *res;
# Line 749 | Line 630 | serverinfo_vhost6: VHOST6 '=' QSTRING ';
630      {
631        assert(res);
632  
633 <      memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen);
634 <      ServerInfo.ip6.ss.ss_family = res->ai_family;
635 <      ServerInfo.ip6.ss_len = res->ai_addrlen;
633 >      memcpy(&ConfigServerInfo.ip6, res->ai_addr, res->ai_addrlen);
634 >      ConfigServerInfo.ip6.ss.ss_family = res->ai_family;
635 >      ConfigServerInfo.ip6.ss_len = res->ai_addrlen;
636        freeaddrinfo(res);
637  
638 <      ServerInfo.specific_ipv6_vhost = 1;
638 >      ConfigServerInfo.specific_ipv6_vhost = 1;
639      }
640    }
760 #endif
641   };
642  
643 < serverinfo_max_clients: T_MAX_CLIENTS '=' NUMBER ';'
643 > serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';'
644   {
645    if (conf_parser_ctx.pass != 2)
646      break;
647  
648 <  if ($3 < MAXCLIENTS_MIN)
648 >  if ($3 < 1)
649    {
650 <    char buf[IRCD_BUFSIZE] = "";
651 <
772 <    snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
773 <    conf_error_report(buf);
774 <    ServerInfo.max_clients = MAXCLIENTS_MIN;
650 >    conf_error_report("default_max_clients too low, setting to 1");
651 >    ConfigServerInfo.default_max_clients = 1;
652    }
653    else if ($3 > MAXCLIENTS_MAX)
654    {
655      char buf[IRCD_BUFSIZE] = "";
656  
657 <    snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
657 >    snprintf(buf, sizeof(buf), "default_max_clients too high, setting to %d", MAXCLIENTS_MAX);
658      conf_error_report(buf);
659 <    ServerInfo.max_clients = MAXCLIENTS_MAX;
659 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX;
660    }
661    else
662 <    ServerInfo.max_clients = $3;
662 >    ConfigServerInfo.default_max_clients = $3;
663   };
664  
665   serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';'
# Line 793 | Line 670 | serverinfo_max_nick_length: MAX_NICK_LEN
670    if ($3 < 9)
671    {
672      conf_error_report("max_nick_length too low, setting to 9");
673 <    ServerInfo.max_nick_length = 9;
673 >    ConfigServerInfo.max_nick_length = 9;
674    }
675    else if ($3 > NICKLEN)
676    {
# Line 801 | Line 678 | serverinfo_max_nick_length: MAX_NICK_LEN
678  
679      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
680      conf_error_report(buf);
681 <    ServerInfo.max_nick_length = NICKLEN;
681 >    ConfigServerInfo.max_nick_length = NICKLEN;
682    }
683    else
684 <    ServerInfo.max_nick_length = $3;
684 >    ConfigServerInfo.max_nick_length = $3;
685   };
686  
687   serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';'
# Line 815 | Line 692 | serverinfo_max_topic_length: MAX_TOPIC_L
692    if ($3 < 80)
693    {
694      conf_error_report("max_topic_length too low, setting to 80");
695 <    ServerInfo.max_topic_length = 80;
695 >    ConfigServerInfo.max_topic_length = 80;
696    }
697    else if ($3 > TOPICLEN)
698    {
# Line 823 | Line 700 | serverinfo_max_topic_length: MAX_TOPIC_L
700  
701      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
702      conf_error_report(buf);
703 <    ServerInfo.max_topic_length = TOPICLEN;
703 >    ConfigServerInfo.max_topic_length = TOPICLEN;
704    }
705    else
706 <    ServerInfo.max_topic_length = $3;
706 >    ConfigServerInfo.max_topic_length = $3;
707   };
708  
709   serverinfo_hub: HUB '=' TBOOL ';'
710   {
711    if (conf_parser_ctx.pass == 2)
712 <    ServerInfo.hub = yylval.number;
712 >    ConfigServerInfo.hub = yylval.number;
713   };
714  
715 +
716   /***************************************************************************
717 < * admin section
717 > * admin {} section
718   ***************************************************************************/
719   admin_entry: ADMIN  '{' admin_items '}' ';' ;
720  
# Line 851 | Line 729 | admin_name: NAME '=' QSTRING ';'
729    if (conf_parser_ctx.pass != 2)
730      break;
731  
732 <  MyFree(AdminInfo.name);
733 <  AdminInfo.name = xstrdup(yylval.string);
732 >  xfree(ConfigAdminInfo.name);
733 >  ConfigAdminInfo.name = xstrdup(yylval.string);
734   };
735  
736   admin_email: EMAIL '=' QSTRING ';'
# Line 860 | Line 738 | admin_email: EMAIL '=' QSTRING ';'
738    if (conf_parser_ctx.pass != 2)
739      break;
740  
741 <  MyFree(AdminInfo.email);
742 <  AdminInfo.email = xstrdup(yylval.string);
741 >  xfree(ConfigAdminInfo.email);
742 >  ConfigAdminInfo.email = xstrdup(yylval.string);
743   };
744  
745   admin_description: DESCRIPTION '=' QSTRING ';'
# Line 869 | Line 747 | admin_description: DESCRIPTION '=' QSTRI
747    if (conf_parser_ctx.pass != 2)
748      break;
749  
750 <  MyFree(AdminInfo.description);
751 <  AdminInfo.description = xstrdup(yylval.string);
750 >  xfree(ConfigAdminInfo.description);
751 >  ConfigAdminInfo.description = xstrdup(yylval.string);
752   };
753  
754 +
755   /***************************************************************************
756 < * motd section
756 > * motd {} section
757   ***************************************************************************/
758   motd_entry: MOTD
759   {
# Line 882 | Line 761 | motd_entry: MOTD
761      reset_block_state();
762   } '{' motd_items '}' ';'
763   {
764 <  dlink_node *ptr = NULL;
764 >  dlink_node *node = NULL;
765  
766    if (conf_parser_ctx.pass != 2)
767      break;
# Line 890 | Line 769 | motd_entry: MOTD
769    if (!block_state.file.buf[0])
770      break;
771  
772 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
773 <    motd_add(ptr->data, block_state.file.buf);
772 >  DLINK_FOREACH(node, block_state.mask.list.head)
773 >    motd_add(node->data, block_state.file.buf);
774   };
775  
776   motd_items: motd_items motd_item | motd_item;
# Line 909 | Line 788 | motd_file: T_FILE '=' QSTRING ';'
788      strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
789   };
790  
791 +
792 + /***************************************************************************
793 + * pseudo {} section
794 + ***************************************************************************/
795 + pseudo_entry: T_PSEUDO
796 + {
797 +  if (conf_parser_ctx.pass == 2)
798 +    reset_block_state();
799 + } '{' pseudo_items '}' ';'
800 + {
801 +  if (conf_parser_ctx.pass != 2)
802 +    break;
803 +
804 +  if (!block_state.command.buf[0] ||
805 +      !block_state.name.buf[0] ||
806 +      !block_state.nick.buf[0] ||
807 +      !block_state.host.buf[0])
808 +    break;
809 +
810 +  pseudo_register(block_state.name.buf, block_state.nick.buf, block_state.host.buf,
811 +                  block_state.prepend.buf, block_state.command.buf);
812 + };
813 +
814 + pseudo_items: pseudo_items pseudo_item | pseudo_item;
815 + pseudo_item:  pseudo_command | pseudo_prepend | pseudo_name | pseudo_target | error ';' ;
816 +
817 + pseudo_command: T_COMMAND '=' QSTRING ';'
818 + {
819 +  if (conf_parser_ctx.pass == 2)
820 +    strlcpy(block_state.command.buf, yylval.string, sizeof(block_state.command.buf));
821 + };
822 +
823 + pseudo_name: NAME '=' QSTRING ';'
824 + {
825 +  if (conf_parser_ctx.pass == 2)
826 +    strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
827 + };
828 +
829 + pseudo_prepend: T_PREPEND '=' QSTRING ';'
830 + {
831 +  if (conf_parser_ctx.pass == 2)
832 +    strlcpy(block_state.prepend.buf, yylval.string, sizeof(block_state.prepend.buf));
833 + };
834 +
835 + pseudo_target: T_TARGET '=' QSTRING ';'
836 + {
837 +  if (conf_parser_ctx.pass == 2)
838 +  {
839 +    struct split_nuh_item nuh;
840 +
841 +    nuh.nuhmask  = yylval.string;
842 +    nuh.nickptr  = NULL;
843 +    nuh.userptr  = block_state.nick.buf;
844 +    nuh.hostptr  = block_state.host.buf;
845 +    nuh.nicksize = 0;
846 +    nuh.usersize = sizeof(block_state.nick.buf);
847 +    nuh.hostsize = sizeof(block_state.host.buf);
848 +
849 +    split_nuh(&nuh);
850 +  }
851 + };
852 +
853 +
854   /***************************************************************************
855 < *  section logging
855 > * log {} section
856   ***************************************************************************/
857   logging_entry:          T_LOG  '{' logging_items '}' ';' ;
858   logging_items:          logging_items logging_item | logging_item ;
# Line 921 | Line 863 | logging_item:           logging_use_logg
863   logging_use_logging: USE_LOGGING '=' TBOOL ';'
864   {
865    if (conf_parser_ctx.pass == 2)
866 <    ConfigLoggingEntry.use_logging = yylval.number;
866 >    ConfigLog.use_logging = yylval.number;
867   };
868  
869   logging_file_entry:
# Line 975 | Line 917 | logging_file_type_item:  USER
917   {
918    if (conf_parser_ctx.pass == 2)
919      block_state.type.value = LOG_TYPE_OPER;
978 } | GLINE
979 {
980  if (conf_parser_ctx.pass == 2)
981    block_state.type.value = LOG_TYPE_GLINE;
920   } | XLINE
921   {
922    if (conf_parser_ctx.pass == 2)
# Line 1007 | Line 945 | logging_file_type_item:  USER
945  
946  
947   /***************************************************************************
948 < * section oper
948 > * operator {} section
949   ***************************************************************************/
950   oper_entry: OPERATOR
951   {
# Line 1018 | Line 956 | oper_entry: OPERATOR
956    block_state.flags.value |= CONF_FLAGS_ENCRYPTED;
957   } '{' oper_items '}' ';'
958   {
959 <  dlink_node *ptr = NULL;
959 >  dlink_node *node = NULL;
960  
961    if (conf_parser_ctx.pass != 2)
962      break;
963  
964    if (!block_state.name.buf[0])
965      break;
966 < #ifdef HAVE_LIBCRYPTO
1029 <  if (!block_state.file.buf[0] &&
1030 <      !block_state.rpass.buf[0])
1031 <    break;
1032 < #else
966 >
967    if (!block_state.rpass.buf[0])
968      break;
1035 #endif
969  
970 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
970 >  DLINK_FOREACH(node, block_state.mask.list.head)
971    {
972      struct MaskItem *conf = NULL;
973      struct split_nuh_item nuh;
974 +    char *s = node->data;
975 +
976 +    if (EmptyString(s))
977 +      continue;
978  
979 <    nuh.nuhmask  = ptr->data;
979 >    nuh.nuhmask  = s;
980      nuh.nickptr  = NULL;
981      nuh.userptr  = block_state.user.buf;
982      nuh.hostptr  = block_state.host.buf;
# Line 1059 | Line 996 | oper_entry: OPERATOR
996      if (block_state.rpass.buf[0])
997        conf->passwd = xstrdup(block_state.rpass.buf);
998  
999 +    if (block_state.whois.buf[0])
1000 +      conf->whois = xstrdup(block_state.whois.buf);
1001 +
1002      conf->flags = block_state.flags.value;
1003      conf->modes = block_state.modes.value;
1004      conf->port  = block_state.port.value;
1005      conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits);
1006  
1007      conf_add_class_to_conf(conf, block_state.class.buf);
1068
1069 #ifdef HAVE_LIBCRYPTO
1070    if (block_state.file.buf[0])
1071    {
1072      BIO *file = NULL;
1073      RSA *pkey = NULL;
1074
1075      if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1076      {
1077        conf_error_report("Ignoring rsa_public_key_file -- file doesn't exist");
1078        break;
1079      }
1080
1081      if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1082        conf_error_report("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
1083
1084      conf->rsa_public_key = pkey;
1085      BIO_set_close(file, BIO_CLOSE);
1086      BIO_free(file);
1087    }
1088 #endif /* HAVE_LIBCRYPTO */
1008    }
1009   };
1010  
# Line 1093 | Line 1012 | oper_items:     oper_items oper_item | o
1012   oper_item:      oper_name |
1013                  oper_user |
1014                  oper_password |
1015 +                oper_whois |
1016                  oper_umodes |
1017                  oper_class |
1018                  oper_encrypted |
1099                oper_rsa_public_key_file |
1019                  oper_ssl_certificate_fingerprint |
1020                  oper_ssl_connection_required |
1021                  oper_flags |
# Line 1120 | Line 1039 | oper_password: PASSWORD '=' QSTRING ';'
1039      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1040   };
1041  
1042 + oper_whois: WHOIS '=' QSTRING ';'
1043 + {
1044 +  if (conf_parser_ctx.pass == 2)
1045 +    strlcpy(block_state.whois.buf, yylval.string, sizeof(block_state.whois.buf));
1046 + };
1047 +
1048   oper_encrypted: ENCRYPTED '=' TBOOL ';'
1049   {
1050    if (conf_parser_ctx.pass != 2)
# Line 1131 | Line 1056 | oper_encrypted: ENCRYPTED '=' TBOOL ';'
1056      block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED;
1057   };
1058  
1134 oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';'
1135 {
1136  if (conf_parser_ctx.pass == 2)
1137    strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
1138 };
1139
1059   oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1060   {
1061    if (conf_parser_ctx.pass == 2)
# Line 1223 | Line 1142 | oper_umodes_item:  T_BOTS
1142   {
1143    if (conf_parser_ctx.pass == 2)
1144      block_state.modes.value |= UMODE_EXTERNAL;
1226 } | T_OPERWALL
1227 {
1228  if (conf_parser_ctx.pass == 2)
1229    block_state.modes.value |= UMODE_OPERWALL;
1145   } | T_SERVNOTICE
1146   {
1147    if (conf_parser_ctx.pass == 2)
# Line 1295 | Line 1210 | oper_flags_item: KILL ':' REMOTE
1210   } | KLINE
1211   {
1212    if (conf_parser_ctx.pass == 2)
1213 <    block_state.port.value |= OPER_FLAG_K;
1213 >    block_state.port.value |= OPER_FLAG_KLINE;
1214   } | UNKLINE
1215   {
1216    if (conf_parser_ctx.pass == 2)
# Line 1316 | Line 1231 | oper_flags_item: KILL ':' REMOTE
1231   {
1232    if (conf_parser_ctx.pass == 2)
1233      block_state.port.value |= OPER_FLAG_UNXLINE;
1319 } | GLINE
1320 {
1321  if (conf_parser_ctx.pass == 2)
1322    block_state.port.value |= OPER_FLAG_GLINE;
1234   } | DIE
1235   {
1236    if (conf_parser_ctx.pass == 2)
# Line 1328 | Line 1239 | oper_flags_item: KILL ':' REMOTE
1239   {
1240    if (conf_parser_ctx.pass == 2)
1241      block_state.port.value |= OPER_FLAG_RESTART;
1242 + } | REHASH ':' REMOTE
1243 + {
1244 +  if (conf_parser_ctx.pass == 2)
1245 +    block_state.port.value |= OPER_FLAG_REHASH_REMOTE;
1246   } | REHASH
1247   {
1248    if (conf_parser_ctx.pass == 2)
# Line 1336 | Line 1251 | oper_flags_item: KILL ':' REMOTE
1251   {
1252    if (conf_parser_ctx.pass == 2)
1253      block_state.port.value |= OPER_FLAG_ADMIN;
1339 } | T_OPERWALL
1340 {
1341  if (conf_parser_ctx.pass == 2)
1342    block_state.port.value |= OPER_FLAG_OPERWALL;
1254   } | T_GLOBOPS
1255   {
1256    if (conf_parser_ctx.pass == 2)
# Line 1364 | Line 1275 | oper_flags_item: KILL ':' REMOTE
1275   {
1276    if (conf_parser_ctx.pass == 2)
1277      block_state.port.value |= OPER_FLAG_MODULE;
1278 + } | T_OPME
1279 + {
1280 +  if (conf_parser_ctx.pass == 2)
1281 +    block_state.port.value |= OPER_FLAG_OPME;
1282 + } | NICK ':' RESV
1283 + {
1284 +  if (conf_parser_ctx.pass == 2)
1285 +    block_state.port.value |= OPER_FLAG_NICK_RESV;
1286 + } | JOIN ':' RESV
1287 + {
1288 +  if (conf_parser_ctx.pass == 2)
1289 +    block_state.port.value |= OPER_FLAG_JOIN_RESV;
1290 + } | RESV
1291 + {
1292 +  if (conf_parser_ctx.pass == 2)
1293 +    block_state.port.value |= OPER_FLAG_RESV;
1294 + } | T_UNRESV
1295 + {
1296 +  if (conf_parser_ctx.pass == 2)
1297 +    block_state.port.value |= OPER_FLAG_UNRESV;
1298 + } | CLOSE
1299 + {
1300 +  if (conf_parser_ctx.pass == 2)
1301 +    block_state.port.value |= OPER_FLAG_CLOSE;
1302   };
1303  
1304  
1305   /***************************************************************************
1306 < *  section class
1306 > * class {} section
1307   ***************************************************************************/
1308   class_entry: CLASS
1309   {
# Line 1392 | Line 1327 | class_entry: CLASS
1327    if (!block_state.class.buf[0])
1328      break;
1329  
1330 <  if (!(class = class_find(block_state.class.buf, 0)))
1330 >  if (!(class = class_find(block_state.class.buf, false)))
1331      class = class_make();
1332  
1333    class->active = 1;
1334 <  MyFree(class->name);
1334 >  xfree(class->name);
1335    class->name = xstrdup(block_state.class.buf);
1336    class->ping_freq = block_state.ping_freq.value;
1337 <  class->max_perip = block_state.max_perip.value;
1337 >  class->max_perip_local = block_state.max_perip_local.value;
1338 >  class->max_perip_global = block_state.max_perip_global.value;
1339    class->con_freq = block_state.con_freq.value;
1340    class->max_total = block_state.max_total.value;
1405  class->max_global = block_state.max_global.value;
1406  class->max_local = block_state.max_local.value;
1407  class->max_ident = block_state.max_ident.value;
1341    class->max_sendq = block_state.max_sendq.value;
1342    class->max_recvq = block_state.max_recvq.value;
1343 +  class->max_channels = block_state.max_channels.value;
1344  
1345    if (block_state.min_idle.value > block_state.max_idle.value)
1346    {
# Line 1419 | Line 1353 | class_entry: CLASS
1353    class->min_idle = block_state.min_idle.value;
1354    class->max_idle = block_state.max_idle.value;
1355  
1356 <  if (class->number_per_cidr && block_state.number_per_cidr.value)
1357 <    if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1424 <        (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
1425 <      if ((class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value) ||
1426 <          (class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value))
1427 <        rebuild_cidr_list(class);
1428 <
1356 >  int diff = (class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value ||
1357 >              class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value);
1358    class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value;
1359    class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value;
1360    class->number_per_cidr = block_state.number_per_cidr.value;
1361 +
1362 +  if (diff)
1363 +    class_ip_limit_rebuild(class);
1364   };
1365  
1366   class_items:    class_items class_item | class_item;
# Line 1437 | Line 1369 | class_item:     class_name |
1369                  class_cidr_bitlen_ipv6 |
1370                  class_ping_time |
1371                  class_number_per_cidr |
1372 <                class_number_per_ip |
1372 >                class_number_per_ip_local |
1373 >                class_number_per_ip_global |
1374                  class_connectfreq |
1375 +                class_max_channels |
1376                  class_max_number |
1377 <                class_max_global |
1378 <                class_max_local |
1445 <                class_max_ident |
1446 <                class_sendq | class_recvq |
1377 >                class_sendq |
1378 >                class_recvq |
1379                  class_min_idle |
1380                  class_max_idle |
1381                  class_flags |
# Line 1461 | Line 1393 | class_ping_time: PING_TIME '=' timespec
1393      block_state.ping_freq.value = $3;
1394   };
1395  
1396 < class_number_per_ip: NUMBER_PER_IP '=' NUMBER ';'
1396 > class_number_per_ip_local: NUMBER_PER_IP_LOCAL '=' NUMBER ';'
1397   {
1398    if (conf_parser_ctx.pass == 1)
1399 <    block_state.max_perip.value = $3;
1399 >    block_state.max_perip_local.value = $3;
1400   };
1401  
1402 < class_connectfreq: CONNECTFREQ '=' timespec ';'
1402 > class_number_per_ip_global: NUMBER_PER_IP_GLOBAL '=' NUMBER ';'
1403   {
1404    if (conf_parser_ctx.pass == 1)
1405 <    block_state.con_freq.value = $3;
1405 >    block_state.max_perip_global.value = $3;
1406   };
1407  
1408 < class_max_number: MAX_NUMBER '=' NUMBER ';'
1477 < {
1478 <  if (conf_parser_ctx.pass == 1)
1479 <    block_state.max_total.value = $3;
1480 < };
1481 <
1482 < class_max_global: MAX_GLOBAL '=' NUMBER ';'
1408 > class_connectfreq: CONNECTFREQ '=' timespec ';'
1409   {
1410    if (conf_parser_ctx.pass == 1)
1411 <    block_state.max_global.value = $3;
1411 >    block_state.con_freq.value = $3;
1412   };
1413  
1414 < class_max_local: MAX_LOCAL '=' NUMBER ';'
1414 > class_max_channels: MAX_CHANNELS '=' NUMBER ';'
1415   {
1416    if (conf_parser_ctx.pass == 1)
1417 <    block_state.max_local.value = $3;
1417 >    block_state.max_channels.value = $3;
1418   };
1419  
1420 < class_max_ident: MAX_IDENT '=' NUMBER ';'
1420 > class_max_number: MAX_NUMBER '=' NUMBER ';'
1421   {
1422    if (conf_parser_ctx.pass == 1)
1423 <    block_state.max_ident.value = $3;
1423 >    block_state.max_total.value = $3;
1424   };
1425  
1426   class_sendq: SENDQ '=' sizespec ';'
# Line 1565 | Line 1491 | class_flags_item: RANDOM_IDLE
1491  
1492  
1493   /***************************************************************************
1494 < *  section listen
1494 > * listen {} section
1495   ***************************************************************************/
1496   listen_entry: LISTEN
1497   {
# Line 1604 | Line 1530 | port_item: NUMBER
1530   {
1531    if (conf_parser_ctx.pass == 2)
1532    {
1533 + #ifndef HAVE_TLS
1534      if (block_state.flags.value & LISTENER_SSL)
1535 < #ifdef HAVE_LIBCRYPTO
1536 <      if (!ServerInfo.server_ctx)
1535 >    {
1536 >      conf_error_report("TLS not available - port closed");
1537 >      break;
1538 >    }
1539   #endif
1540 <      {
1612 <        conf_error_report("SSL not available - port closed");
1613 <        break;
1614 <      }
1615 <    add_listener($1, block_state.addr.buf, block_state.flags.value);
1540 >    listener_add($1, block_state.addr.buf, block_state.flags.value);
1541    }
1542   } | NUMBER TWODOTS NUMBER
1543   {
1544    if (conf_parser_ctx.pass == 2)
1545    {
1546 + #ifndef HAVE_TLS
1547      if (block_state.flags.value & LISTENER_SSL)
1548 < #ifdef HAVE_LIBCRYPTO
1549 <      if (!ServerInfo.server_ctx)
1548 >    {
1549 >      conf_error_report("TLS not available - port closed");
1550 >      break;
1551 >    }
1552   #endif
1625      {
1626        conf_error_report("SSL not available - port closed");
1627        break;
1628      }
1553  
1554      for (int i = $1; i <= $3; ++i)
1555 <      add_listener(i, block_state.addr.buf, block_state.flags.value);
1555 >      listener_add(i, block_state.addr.buf, block_state.flags.value);
1556    }
1557   };
1558  
# Line 1644 | Line 1568 | listen_host: HOST '=' QSTRING ';'
1568      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
1569   };
1570  
1571 +
1572   /***************************************************************************
1573 < *  section auth
1573 > * auth {} section
1574   ***************************************************************************/
1575   auth_entry: IRCD_AUTH
1576   {
# Line 1653 | Line 1578 | auth_entry: IRCD_AUTH
1578      reset_block_state();
1579   } '{' auth_items '}' ';'
1580   {
1581 <  dlink_node *ptr = NULL;
1581 >  dlink_node *node = NULL;
1582  
1583    if (conf_parser_ctx.pass != 2)
1584      break;
1585  
1586 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1586 >  DLINK_FOREACH(node, block_state.mask.list.head)
1587    {
1588      struct MaskItem *conf = NULL;
1589      struct split_nuh_item nuh;
1590 +    char *s = node->data;
1591  
1592 <    nuh.nuhmask  = ptr->data;
1592 >    if (EmptyString(s))
1593 >      continue;
1594 >
1595 >    nuh.nuhmask  = s;
1596      nuh.nickptr  = NULL;
1597      nuh.userptr  = block_state.user.buf;
1598      nuh.hostptr  = block_state.host.buf;
# Line 1748 | Line 1677 | auth_flags_item: SPOOF_NOTICE
1677   {
1678    if (conf_parser_ctx.pass == 2)
1679      block_state.flags.value |= CONF_FLAGS_EXEMPTKLINE;
1680 + } | XLINE_EXEMPT
1681 + {
1682 +  if (conf_parser_ctx.pass == 2)
1683 +    block_state.flags.value |= CONF_FLAGS_EXEMPTXLINE;
1684   } | NEED_IDENT
1685   {
1686    if (conf_parser_ctx.pass == 2)
# Line 1760 | Line 1693 | auth_flags_item: SPOOF_NOTICE
1693   {
1694    if (conf_parser_ctx.pass == 2)
1695      block_state.flags.value |= CONF_FLAGS_NO_TILDE;
1763 } | GLINE_EXEMPT
1764 {
1765  if (conf_parser_ctx.pass == 2)
1766    block_state.flags.value |= CONF_FLAGS_EXEMPTGLINE;
1696   } | RESV_EXEMPT
1697   {
1698    if (conf_parser_ctx.pass == 2)
# Line 1812 | Line 1741 | auth_redir_port: REDIRPORT '=' NUMBER ';
1741  
1742  
1743   /***************************************************************************
1744 < *  section resv
1744 > * resv {} section
1745   ***************************************************************************/
1746   resv_entry: RESV
1747   {
# Line 1826 | Line 1755 | resv_entry: RESV
1755    if (conf_parser_ctx.pass != 2)
1756      break;
1757  
1758 <  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1758 >  resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1759   };
1760  
1761   resv_items:     resv_items resv_item | resv_item;
# Line 1852 | Line 1781 | resv_exempt: EXEMPT '=' QSTRING ';'
1781  
1782  
1783   /***************************************************************************
1784 < *  section service
1784 > * service {} section
1785   ***************************************************************************/
1786   service_entry: T_SERVICE '{' service_items '}' ';';
1787  
# Line 1864 | Line 1793 | service_name: NAME '=' QSTRING ';'
1793    if (conf_parser_ctx.pass != 2)
1794      break;
1795  
1796 <  if (valid_servname(yylval.string))
1796 >  if (server_valid_name(yylval.string) == true)
1797    {
1798 <    struct MaskItem *conf = conf_make(CONF_SERVICE);
1799 <    conf->name = xstrdup(yylval.string);
1798 >    struct ServiceItem *service = service_make();
1799 >    service->name = xstrdup(yylval.string);
1800    }
1801   };
1802  
1803 +
1804   /***************************************************************************
1805 < *  section shared, for sharing remote klines etc.
1805 > * shared {} section, for sharing remote klines etc.
1806   ***************************************************************************/
1807   shared_entry: T_SHARED
1808   {
# Line 1887 | Line 1817 | shared_entry: T_SHARED
1817    block_state.flags.value = SHARED_ALL;
1818   } '{' shared_items '}' ';'
1819   {
1890  struct MaskItem *conf = NULL;
1891
1820    if (conf_parser_ctx.pass != 2)
1821      break;
1822  
1823 <  conf = conf_make(CONF_ULINE);
1824 <  conf->flags = block_state.flags.value;
1825 <  conf->name = xstrdup(block_state.name.buf);
1826 <  conf->user = xstrdup(block_state.user.buf);
1827 <  conf->host = xstrdup(block_state.host.buf);
1823 >  struct SharedItem *shared = shared_make();
1824 >  shared->type = block_state.flags.value;
1825 >  shared->server = xstrdup(block_state.name.buf);
1826 >  shared->user = xstrdup(block_state.user.buf);
1827 >  shared->host = xstrdup(block_state.host.buf);
1828   };
1829  
1830   shared_items: shared_items shared_item | shared_item;
# Line 1976 | Line 1904 | shared_type_item: KLINE
1904      block_state.flags.value = SHARED_ALL;
1905   };
1906  
1907 +
1908   /***************************************************************************
1909 < *  section cluster
1909 > * cluster {} section
1910   ***************************************************************************/
1911   cluster_entry: T_CLUSTER
1912   {
# Line 1987 | Line 1916 | cluster_entry: T_CLUSTER
1916    reset_block_state();
1917  
1918    strlcpy(block_state.name.buf, "*", sizeof(block_state.name.buf));
1919 <  block_state.flags.value = SHARED_ALL;
1919 >  block_state.flags.value = CLUSTER_ALL;
1920   } '{' cluster_items '}' ';'
1921   {
1993  struct MaskItem *conf = NULL;
1994
1922    if (conf_parser_ctx.pass != 2)
1923      break;
1924  
1925 <  conf = conf_make(CONF_CLUSTER);
1926 <  conf->flags = block_state.flags.value;
1927 <  conf->name = xstrdup(block_state.name.buf);
1925 >  struct ClusterItem *cluster = cluster_make();
1926 >  cluster->type = block_state.flags.value;
1927 >  cluster->server = xstrdup(block_state.name.buf);
1928   };
1929  
1930   cluster_items:  cluster_items cluster_item | cluster_item;
# Line 2019 | Line 1946 | cluster_types:  cluster_types ',' cluste
1946   cluster_type_item: KLINE
1947   {
1948    if (conf_parser_ctx.pass == 2)
1949 <    block_state.flags.value |= SHARED_KLINE;
1949 >    block_state.flags.value |= CLUSTER_KLINE;
1950   } | UNKLINE
1951   {
1952    if (conf_parser_ctx.pass == 2)
1953 <    block_state.flags.value |= SHARED_UNKLINE;
1953 >    block_state.flags.value |= CLUSTER_UNKLINE;
1954   } | T_DLINE
1955   {
1956    if (conf_parser_ctx.pass == 2)
1957 <    block_state.flags.value |= SHARED_DLINE;
1957 >    block_state.flags.value |= CLUSTER_DLINE;
1958   } | T_UNDLINE
1959   {
1960    if (conf_parser_ctx.pass == 2)
1961 <    block_state.flags.value |= SHARED_UNDLINE;
1961 >    block_state.flags.value |= CLUSTER_UNDLINE;
1962   } | XLINE
1963   {
1964    if (conf_parser_ctx.pass == 2)
1965 <    block_state.flags.value |= SHARED_XLINE;
1965 >    block_state.flags.value |= CLUSTER_XLINE;
1966   } | T_UNXLINE
1967   {
1968    if (conf_parser_ctx.pass == 2)
1969 <    block_state.flags.value |= SHARED_UNXLINE;
1969 >    block_state.flags.value |= CLUSTER_UNXLINE;
1970   } | RESV
1971   {
1972    if (conf_parser_ctx.pass == 2)
1973 <    block_state.flags.value |= SHARED_RESV;
1973 >    block_state.flags.value |= CLUSTER_RESV;
1974   } | T_UNRESV
1975   {
1976    if (conf_parser_ctx.pass == 2)
1977 <    block_state.flags.value |= SHARED_UNRESV;
1977 >    block_state.flags.value |= CLUSTER_UNRESV;
1978   } | T_LOCOPS
1979   {
1980    if (conf_parser_ctx.pass == 2)
1981 <    block_state.flags.value |= SHARED_LOCOPS;
1981 >    block_state.flags.value |= CLUSTER_LOCOPS;
1982   } | T_ALL
1983   {
1984    if (conf_parser_ctx.pass == 2)
1985 <    block_state.flags.value = SHARED_ALL;
1985 >    block_state.flags.value = CLUSTER_ALL;
1986   };
1987  
1988 +
1989   /***************************************************************************
1990 < *  section connect
1990 > * connect {}  section
1991   ***************************************************************************/
1992   connect_entry: CONNECT
1993   {
# Line 2212 | Line 2140 | connect_aftype: AFTYPE '=' T_IPV4 ';'
2140      block_state.aftype.value = AF_INET;
2141   } | AFTYPE '=' T_IPV6 ';'
2142   {
2215 #ifdef IPV6
2143    if (conf_parser_ctx.pass == 2)
2144      block_state.aftype.value = AF_INET6;
2218 #endif
2145   };
2146  
2147   connect_flags: IRCD_FLAGS
# Line 2265 | Line 2191 | connect_class: CLASS '=' QSTRING ';'
2191  
2192   connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
2193   {
2194 < #ifdef HAVE_LIBCRYPTO
2194 > #ifdef HAVE_TLS
2195    if (conf_parser_ctx.pass == 2)
2196      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2197   #else
2198    if (conf_parser_ctx.pass == 2)
2199 <    conf_error_report("Ignoring connect::ciphers -- no OpenSSL support");
2199 >    conf_error_report("Ignoring connect::ciphers -- no TLS support");
2200   #endif
2201   };
2202  
2203  
2204   /***************************************************************************
2205 < *  section kill
2205 > * kill {} section
2206   ***************************************************************************/
2207   kill_entry: KILL
2208   {
# Line 2333 | Line 2259 | kill_reason: REASON '=' QSTRING ';'
2259      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2260   };
2261  
2262 +
2263   /***************************************************************************
2264 < *  section deny
2264 > * deny {} section
2265   ***************************************************************************/
2266   deny_entry: DENY
2267   {
# Line 2378 | Line 2305 | deny_reason: REASON '=' QSTRING ';'
2305      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2306   };
2307  
2308 +
2309   /***************************************************************************
2310 < *  section exempt
2310 > * exempt {} section
2311   ***************************************************************************/
2312   exempt_entry: EXEMPT '{' exempt_items '}' ';';
2313  
2314 < exempt_items:     exempt_items exempt_item | exempt_item;
2315 < exempt_item:      exempt_ip | error;
2314 > exempt_items: exempt_items exempt_item | exempt_item;
2315 > exempt_item:  exempt_ip | error;
2316  
2317   exempt_ip: IP '=' QSTRING ';'
2318   {
2319    if (conf_parser_ctx.pass == 2)
2320    {
2321 <    if (yylval.string[0] && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2321 >    if (*yylval.string && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2322      {
2323        struct MaskItem *conf = conf_make(CONF_EXEMPT);
2324        conf->host = xstrdup(yylval.string);
# Line 2401 | Line 2329 | exempt_ip: IP '=' QSTRING ';'
2329   };
2330  
2331   /***************************************************************************
2332 < *  section gecos
2332 > * gecos {} section
2333   ***************************************************************************/
2334   gecos_entry: GECOS
2335   {
# Line 2409 | Line 2337 | gecos_entry: GECOS
2337      reset_block_state();
2338   } '{' gecos_items '}' ';'
2339   {
2412  struct MaskItem *conf = NULL;
2413
2340    if (conf_parser_ctx.pass != 2)
2341      break;
2342  
2343    if (!block_state.name.buf[0])
2344      break;
2345  
2346 <  conf = conf_make(CONF_XLINE);
2347 <  conf->name = xstrdup(block_state.name.buf);
2346 >  struct GecosItem *gecos = gecos_make();
2347 >  gecos->mask = xstrdup(block_state.name.buf);
2348  
2349    if (block_state.rpass.buf[0])
2350 <    conf->reason = xstrdup(block_state.rpass.buf);
2350 >    gecos->reason = xstrdup(block_state.rpass.buf);
2351    else
2352 <    conf->reason = xstrdup(CONF_NOREASON);
2352 >    gecos->reason = xstrdup(CONF_NOREASON);
2353   };
2354  
2355   gecos_items: gecos_items gecos_item | gecos_item;
# Line 2441 | Line 2367 | gecos_reason: REASON '=' QSTRING ';'
2367      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2368   };
2369  
2370 +
2371   /***************************************************************************
2372 < *  section general
2372 > * general {} section
2373   ***************************************************************************/
2374 < general_entry: GENERAL
2448 <  '{' general_items '}' ';';
2374 > general_entry: GENERAL '{' general_items '}' ';';
2375  
2376   general_items:      general_items general_item | general_item;
2377 < general_item:       general_hide_spoof_ips |
2378 <                    general_ignore_bogus_ts |
2377 > general_item:       general_away_count |
2378 >                    general_away_time |
2379                      general_failed_oper_notice |
2380                      general_anti_nick_flood |
2381                      general_max_nick_time |
2382                      general_max_nick_changes |
2383                      general_max_accept |
2384 +                    general_whowas_history_length |
2385                      general_anti_spam_exit_message_time |
2386                      general_ts_warn_delta |
2387                      general_ts_max_delta |
# Line 2462 | Line 2389 | general_item:       general_hide_spoof_i
2389                      general_invisible_on_connect |
2390                      general_warn_no_connect_block |
2391                      general_dots_in_ident |
2465                    general_stats_o_oper_only |
2466                    general_stats_k_oper_only |
2467                    general_pace_wait |
2392                      general_stats_i_oper_only |
2393 <                    general_pace_wait_simple |
2393 >                    general_stats_k_oper_only |
2394 >                    general_stats_m_oper_only |
2395 >                    general_stats_o_oper_only |
2396                      general_stats_P_oper_only |
2397                      general_stats_u_oper_only |
2398 +                    general_pace_wait |
2399 +                    general_pace_wait_simple |
2400                      general_short_motd |
2401                      general_no_oper_flood |
2474                    general_true_no_oper_flood |
2475                    general_oper_pass_resv |
2402                      general_oper_only_umodes |
2403                      general_max_targets |
2478                    general_use_egd |
2479                    general_egdpool_path |
2404                      general_oper_umodes |
2405                      general_caller_id_wait |
2406                      general_opers_bypass_callerid |
2407                      general_default_floodcount |
2408 +                    general_default_floodtime |
2409                      general_min_nonwildcard |
2410                      general_min_nonwildcard_simple |
2411 +                    general_throttle_count |
2412                      general_throttle_time |
2487                    general_havent_read_conf |
2413                      general_ping_cookie |
2414                      general_disable_auth |
2415                      general_tkline_expire_notices |
2416 <                    general_gline_enable |
2417 <                    general_gline_duration |
2418 <                    general_gline_request_duration |
2419 <                    general_gline_min_cidr |
2495 <                    general_gline_min_cidr6 |
2416 >                    general_dline_min_cidr |
2417 >                    general_dline_min_cidr6 |
2418 >                    general_kline_min_cidr |
2419 >                    general_kline_min_cidr6 |
2420                      general_stats_e_disabled |
2421                      general_max_watch |
2498                    general_services_name |
2422                      general_cycle_on_host_change |
2423                      error;
2424  
2425  
2426 < general_max_watch: MAX_WATCH '=' NUMBER ';'
2426 > general_away_count: AWAY_COUNT '=' NUMBER ';'
2427   {
2428 <  ConfigFileEntry.max_watch = $3;
2428 >  ConfigGeneral.away_count = $3;
2429   };
2430  
2431 < general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2431 > general_away_time: AWAY_TIME '=' timespec ';'
2432   {
2433 <  if (conf_parser_ctx.pass == 2)
2511 <    ConfigFileEntry.cycle_on_host_change = yylval.number;
2433 >  ConfigGeneral.away_time = $3;
2434   };
2435  
2436 < general_gline_enable: GLINE_ENABLE '=' TBOOL ';'
2436 > general_max_watch: MAX_WATCH '=' NUMBER ';'
2437   {
2438 <  if (conf_parser_ctx.pass == 2)
2517 <    ConfigFileEntry.glines = yylval.number;
2438 >  ConfigGeneral.max_watch = $3;
2439   };
2440  
2441 < general_gline_duration: GLINE_DURATION '=' timespec ';'
2441 > general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';'
2442   {
2443 <  if (conf_parser_ctx.pass == 2)
2523 <    ConfigFileEntry.gline_time = $3;
2443 >  ConfigGeneral.whowas_history_length = $3;
2444   };
2445  
2446 < general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';'
2446 > general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2447   {
2448    if (conf_parser_ctx.pass == 2)
2449 <    ConfigFileEntry.gline_request_time = $3;
2449 >    ConfigGeneral.cycle_on_host_change = yylval.number;
2450   };
2451  
2452 < general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';'
2452 > general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';'
2453   {
2454 <  ConfigFileEntry.gline_min_cidr = $3;
2454 >  ConfigGeneral.dline_min_cidr = $3;
2455   };
2456  
2457 < general_gline_min_cidr6: GLINE_MIN_CIDR6 '=' NUMBER ';'
2457 > general_dline_min_cidr6: DLINE_MIN_CIDR6 '=' NUMBER ';'
2458   {
2459 <  ConfigFileEntry.gline_min_cidr6 = $3;
2459 >  ConfigGeneral.dline_min_cidr6 = $3;
2460   };
2461  
2462 < general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2462 > general_kline_min_cidr: KLINE_MIN_CIDR '=' NUMBER ';'
2463   {
2464 <  ConfigFileEntry.tkline_expire_notices = yylval.number;
2464 >  ConfigGeneral.kline_min_cidr = $3;
2465   };
2466  
2467 < general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2467 > general_kline_min_cidr6: KLINE_MIN_CIDR6 '=' NUMBER ';'
2468   {
2469 <  ConfigFileEntry.kill_chase_time_limit = $3;
2469 >  ConfigGeneral.kline_min_cidr6 = $3;
2470   };
2471  
2472 < general_hide_spoof_ips: HIDE_SPOOF_IPS '=' TBOOL ';'
2472 > general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2473   {
2474 <  ConfigFileEntry.hide_spoof_ips = yylval.number;
2474 >  ConfigGeneral.tkline_expire_notices = yylval.number;
2475   };
2476  
2477 < general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';'
2477 > general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2478   {
2479 <  ConfigFileEntry.ignore_bogus_ts = yylval.number;
2479 >  ConfigGeneral.kill_chase_time_limit = $3;
2480   };
2481  
2482   general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';'
2483   {
2484 <  ConfigFileEntry.failed_oper_notice = yylval.number;
2484 >  ConfigGeneral.failed_oper_notice = yylval.number;
2485   };
2486  
2487   general_anti_nick_flood: ANTI_NICK_FLOOD '=' TBOOL ';'
2488   {
2489 <  ConfigFileEntry.anti_nick_flood = yylval.number;
2489 >  ConfigGeneral.anti_nick_flood = yylval.number;
2490   };
2491  
2492   general_max_nick_time: MAX_NICK_TIME '=' timespec ';'
2493   {
2494 <  ConfigFileEntry.max_nick_time = $3;
2494 >  ConfigGeneral.max_nick_time = $3;
2495   };
2496  
2497   general_max_nick_changes: MAX_NICK_CHANGES '=' NUMBER ';'
2498   {
2499 <  ConfigFileEntry.max_nick_changes = $3;
2499 >  ConfigGeneral.max_nick_changes = $3;
2500   };
2501  
2502   general_max_accept: MAX_ACCEPT '=' NUMBER ';'
2503   {
2504 <  ConfigFileEntry.max_accept = $3;
2504 >  ConfigGeneral.max_accept = $3;
2505   };
2506  
2507   general_anti_spam_exit_message_time: ANTI_SPAM_EXIT_MESSAGE_TIME '=' timespec ';'
2508   {
2509 <  ConfigFileEntry.anti_spam_exit_message_time = $3;
2509 >  ConfigGeneral.anti_spam_exit_message_time = $3;
2510   };
2511  
2512   general_ts_warn_delta: TS_WARN_DELTA '=' timespec ';'
2513   {
2514 <  ConfigFileEntry.ts_warn_delta = $3;
2514 >  ConfigGeneral.ts_warn_delta = $3;
2515   };
2516  
2517   general_ts_max_delta: TS_MAX_DELTA '=' timespec ';'
2518   {
2519    if (conf_parser_ctx.pass == 2)
2520 <    ConfigFileEntry.ts_max_delta = $3;
2601 < };
2602 <
2603 < general_havent_read_conf: HAVENT_READ_CONF '=' NUMBER ';'
2604 < {
2605 <  if (($3 > 0) && conf_parser_ctx.pass == 1)
2606 <  {
2607 <    ilog(LOG_TYPE_IRCD, "You haven't read your config file properly.");
2608 <    ilog(LOG_TYPE_IRCD, "There is a line in the example conf that will kill your server if not removed.");
2609 <    ilog(LOG_TYPE_IRCD, "Consider actually reading/editing the conf file, and removing this line.");
2610 <    exit(0);
2611 <  }
2520 >    ConfigGeneral.ts_max_delta = $3;
2521   };
2522  
2523   general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2524   {
2525 <  ConfigFileEntry.invisible_on_connect = yylval.number;
2525 >  ConfigGeneral.invisible_on_connect = yylval.number;
2526   };
2527  
2528   general_warn_no_connect_block: WARN_NO_CONNECT_BLOCK '=' TBOOL ';'
2529   {
2530 <  ConfigFileEntry.warn_no_connect_block = yylval.number;
2530 >  ConfigGeneral.warn_no_connect_block = yylval.number;
2531   };
2532  
2533   general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2534   {
2535 <  ConfigFileEntry.stats_e_disabled = yylval.number;
2535 >  ConfigGeneral.stats_e_disabled = yylval.number;
2536 > };
2537 >
2538 > general_stats_m_oper_only: STATS_M_OPER_ONLY '=' TBOOL ';'
2539 > {
2540 >  ConfigGeneral.stats_m_oper_only = yylval.number;
2541   };
2542  
2543   general_stats_o_oper_only: STATS_O_OPER_ONLY '=' TBOOL ';'
2544   {
2545 <  ConfigFileEntry.stats_o_oper_only = yylval.number;
2545 >  ConfigGeneral.stats_o_oper_only = yylval.number;
2546   };
2547  
2548   general_stats_P_oper_only: STATS_P_OPER_ONLY '=' TBOOL ';'
2549   {
2550 <  ConfigFileEntry.stats_P_oper_only = yylval.number;
2550 >  ConfigGeneral.stats_P_oper_only = yylval.number;
2551   };
2552  
2553   general_stats_u_oper_only: STATS_U_OPER_ONLY '=' TBOOL ';'
2554   {
2555 <  ConfigFileEntry.stats_u_oper_only = yylval.number;
2555 >  ConfigGeneral.stats_u_oper_only = yylval.number;
2556   };
2557  
2558   general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';'
2559   {
2560 <  ConfigFileEntry.stats_k_oper_only = 2 * yylval.number;
2560 >  ConfigGeneral.stats_k_oper_only = 2 * yylval.number;
2561   } | STATS_K_OPER_ONLY '=' TMASKED ';'
2562   {
2563 <  ConfigFileEntry.stats_k_oper_only = 1;
2563 >  ConfigGeneral.stats_k_oper_only = 1;
2564   };
2565  
2566   general_stats_i_oper_only: STATS_I_OPER_ONLY '=' TBOOL ';'
2567   {
2568 <  ConfigFileEntry.stats_i_oper_only = 2 * yylval.number;
2568 >  ConfigGeneral.stats_i_oper_only = 2 * yylval.number;
2569   } | STATS_I_OPER_ONLY '=' TMASKED ';'
2570   {
2571 <  ConfigFileEntry.stats_i_oper_only = 1;
2571 >  ConfigGeneral.stats_i_oper_only = 1;
2572   };
2573  
2574   general_pace_wait: PACE_WAIT '=' timespec ';'
2575   {
2576 <  ConfigFileEntry.pace_wait = $3;
2576 >  ConfigGeneral.pace_wait = $3;
2577   };
2578  
2579   general_caller_id_wait: CALLER_ID_WAIT '=' timespec ';'
2580   {
2581 <  ConfigFileEntry.caller_id_wait = $3;
2581 >  ConfigGeneral.caller_id_wait = $3;
2582   };
2583  
2584   general_opers_bypass_callerid: OPERS_BYPASS_CALLERID '=' TBOOL ';'
2585   {
2586 <  ConfigFileEntry.opers_bypass_callerid = yylval.number;
2586 >  ConfigGeneral.opers_bypass_callerid = yylval.number;
2587   };
2588  
2589   general_pace_wait_simple: PACE_WAIT_SIMPLE '=' timespec ';'
2590   {
2591 <  ConfigFileEntry.pace_wait_simple = $3;
2591 >  ConfigGeneral.pace_wait_simple = $3;
2592   };
2593  
2594   general_short_motd: SHORT_MOTD '=' TBOOL ';'
2595   {
2596 <  ConfigFileEntry.short_motd = yylval.number;
2596 >  ConfigGeneral.short_motd = yylval.number;
2597   };
2598  
2599   general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2600   {
2601 <  ConfigFileEntry.no_oper_flood = yylval.number;
2688 < };
2689 <
2690 < general_true_no_oper_flood: TRUE_NO_OPER_FLOOD '=' TBOOL ';'
2691 < {
2692 <  ConfigFileEntry.true_no_oper_flood = yylval.number;
2693 < };
2694 <
2695 < general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';'
2696 < {
2697 <  ConfigFileEntry.oper_pass_resv = yylval.number;
2601 >  ConfigGeneral.no_oper_flood = yylval.number;
2602   };
2603  
2604   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2605   {
2606 <  ConfigFileEntry.dots_in_ident = $3;
2606 >  ConfigGeneral.dots_in_ident = $3;
2607   };
2608  
2609   general_max_targets: MAX_TARGETS '=' NUMBER ';'
2610   {
2611 <  ConfigFileEntry.max_targets = $3;
2708 < };
2709 <
2710 < general_use_egd: USE_EGD '=' TBOOL ';'
2711 < {
2712 <  ConfigFileEntry.use_egd = yylval.number;
2713 < };
2714 <
2715 < general_egdpool_path: EGDPOOL_PATH '=' QSTRING ';'
2716 < {
2717 <  if (conf_parser_ctx.pass == 2)
2718 <  {
2719 <    MyFree(ConfigFileEntry.egdpool_path);
2720 <    ConfigFileEntry.egdpool_path = xstrdup(yylval.string);
2721 <  }
2611 >  ConfigGeneral.max_targets = $3;
2612   };
2613  
2614 < general_services_name: T_SERVICES_NAME '=' QSTRING ';'
2614 > general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2615   {
2616 <  if (conf_parser_ctx.pass == 2 && valid_servname(yylval.string))
2727 <  {
2728 <    MyFree(ConfigFileEntry.service_name);
2729 <    ConfigFileEntry.service_name = xstrdup(yylval.string);
2730 <  }
2616 >  ConfigGeneral.ping_cookie = yylval.number;
2617   };
2618  
2619 < general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2619 > general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2620   {
2621 <  ConfigFileEntry.ping_cookie = yylval.number;
2621 >  ConfigGeneral.disable_auth = yylval.number;
2622   };
2623  
2624 < general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2624 > general_throttle_count: THROTTLE_COUNT '=' NUMBER ';'
2625   {
2626 <  ConfigFileEntry.disable_auth = yylval.number;
2626 >  ConfigGeneral.throttle_count = $3;
2627   };
2628  
2629   general_throttle_time: THROTTLE_TIME '=' timespec ';'
2630   {
2631 <  ConfigFileEntry.throttle_time = $3;
2631 >  ConfigGeneral.throttle_time = $3;
2632   };
2633  
2634   general_oper_umodes: OPER_UMODES
2635   {
2636 <  ConfigFileEntry.oper_umodes = 0;
2636 >  ConfigGeneral.oper_umodes = 0;
2637   } '='  umode_oitems ';' ;
2638  
2639   umode_oitems:    umode_oitems ',' umode_oitem | umode_oitem;
2640   umode_oitem:     T_BOTS
2641   {
2642 <  ConfigFileEntry.oper_umodes |= UMODE_BOTS;
2642 >  ConfigGeneral.oper_umodes |= UMODE_BOTS;
2643   } | T_CCONN
2644   {
2645 <  ConfigFileEntry.oper_umodes |= UMODE_CCONN;
2645 >  ConfigGeneral.oper_umodes |= UMODE_CCONN;
2646   } | T_DEAF
2647   {
2648 <  ConfigFileEntry.oper_umodes |= UMODE_DEAF;
2648 >  ConfigGeneral.oper_umodes |= UMODE_DEAF;
2649   } | T_DEBUG
2650   {
2651 <  ConfigFileEntry.oper_umodes |= UMODE_DEBUG;
2651 >  ConfigGeneral.oper_umodes |= UMODE_DEBUG;
2652   } | T_FULL
2653   {
2654 <  ConfigFileEntry.oper_umodes |= UMODE_FULL;
2654 >  ConfigGeneral.oper_umodes |= UMODE_FULL;
2655   } | HIDDEN
2656   {
2657 <  ConfigFileEntry.oper_umodes |= UMODE_HIDDEN;
2657 >  ConfigGeneral.oper_umodes |= UMODE_HIDDEN;
2658   } | HIDE_CHANS
2659   {
2660 <  ConfigFileEntry.oper_umodes |= UMODE_HIDECHANS;
2660 >  ConfigGeneral.oper_umodes |= UMODE_HIDECHANS;
2661   } | HIDE_IDLE
2662   {
2663 <  ConfigFileEntry.oper_umodes |= UMODE_HIDEIDLE;
2663 >  ConfigGeneral.oper_umodes |= UMODE_HIDEIDLE;
2664   } | T_SKILL
2665   {
2666 <  ConfigFileEntry.oper_umodes |= UMODE_SKILL;
2666 >  ConfigGeneral.oper_umodes |= UMODE_SKILL;
2667   } | T_NCHANGE
2668   {
2669 <  ConfigFileEntry.oper_umodes |= UMODE_NCHANGE;
2669 >  ConfigGeneral.oper_umodes |= UMODE_NCHANGE;
2670   } | T_REJ
2671   {
2672 <  ConfigFileEntry.oper_umodes |= UMODE_REJ;
2672 >  ConfigGeneral.oper_umodes |= UMODE_REJ;
2673   } | T_UNAUTH
2674   {
2675 <  ConfigFileEntry.oper_umodes |= UMODE_UNAUTH;
2675 >  ConfigGeneral.oper_umodes |= UMODE_UNAUTH;
2676   } | T_SPY
2677   {
2678 <  ConfigFileEntry.oper_umodes |= UMODE_SPY;
2678 >  ConfigGeneral.oper_umodes |= UMODE_SPY;
2679   } | T_EXTERNAL
2680   {
2681 <  ConfigFileEntry.oper_umodes |= UMODE_EXTERNAL;
2796 < } | T_OPERWALL
2797 < {
2798 <  ConfigFileEntry.oper_umodes |= UMODE_OPERWALL;
2681 >  ConfigGeneral.oper_umodes |= UMODE_EXTERNAL;
2682   } | T_SERVNOTICE
2683   {
2684 <  ConfigFileEntry.oper_umodes |= UMODE_SERVNOTICE;
2684 >  ConfigGeneral.oper_umodes |= UMODE_SERVNOTICE;
2685   } | T_INVISIBLE
2686   {
2687 <  ConfigFileEntry.oper_umodes |= UMODE_INVISIBLE;
2687 >  ConfigGeneral.oper_umodes |= UMODE_INVISIBLE;
2688   } | T_WALLOP
2689   {
2690 <  ConfigFileEntry.oper_umodes |= UMODE_WALLOP;
2690 >  ConfigGeneral.oper_umodes |= UMODE_WALLOP;
2691   } | T_SOFTCALLERID
2692   {
2693 <  ConfigFileEntry.oper_umodes |= UMODE_SOFTCALLERID;
2693 >  ConfigGeneral.oper_umodes |= UMODE_SOFTCALLERID;
2694   } | T_CALLERID
2695   {
2696 <  ConfigFileEntry.oper_umodes |= UMODE_CALLERID;
2696 >  ConfigGeneral.oper_umodes |= UMODE_CALLERID;
2697   } | T_LOCOPS
2698   {
2699 <  ConfigFileEntry.oper_umodes |= UMODE_LOCOPS;
2699 >  ConfigGeneral.oper_umodes |= UMODE_LOCOPS;
2700   } | T_NONONREG
2701   {
2702 <  ConfigFileEntry.oper_umodes |= UMODE_REGONLY;
2702 >  ConfigGeneral.oper_umodes |= UMODE_REGONLY;
2703   } | T_FARCONNECT
2704   {
2705 <  ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT;
2705 >  ConfigGeneral.oper_umodes |= UMODE_FARCONNECT;
2706   };
2707  
2708   general_oper_only_umodes: OPER_ONLY_UMODES
2709   {
2710 <  ConfigFileEntry.oper_only_umodes = 0;
2710 >  ConfigGeneral.oper_only_umodes = 0;
2711   } '='  umode_items ';' ;
2712  
2713   umode_items:  umode_items ',' umode_item | umode_item;
2714   umode_item:   T_BOTS
2715   {
2716 <  ConfigFileEntry.oper_only_umodes |= UMODE_BOTS;
2716 >  ConfigGeneral.oper_only_umodes |= UMODE_BOTS;
2717   } | T_CCONN
2718   {
2719 <  ConfigFileEntry.oper_only_umodes |= UMODE_CCONN;
2719 >  ConfigGeneral.oper_only_umodes |= UMODE_CCONN;
2720   } | T_DEAF
2721   {
2722 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEAF;
2722 >  ConfigGeneral.oper_only_umodes |= UMODE_DEAF;
2723   } | T_DEBUG
2724   {
2725 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEBUG;
2725 >  ConfigGeneral.oper_only_umodes |= UMODE_DEBUG;
2726   } | T_FULL
2727   {
2728 <  ConfigFileEntry.oper_only_umodes |= UMODE_FULL;
2728 >  ConfigGeneral.oper_only_umodes |= UMODE_FULL;
2729   } | T_SKILL
2730   {
2731 <  ConfigFileEntry.oper_only_umodes |= UMODE_SKILL;
2731 >  ConfigGeneral.oper_only_umodes |= UMODE_SKILL;
2732   } | HIDDEN
2733   {
2734 <  ConfigFileEntry.oper_only_umodes |= UMODE_HIDDEN;
2734 >  ConfigGeneral.oper_only_umodes |= UMODE_HIDDEN;
2735   } | T_NCHANGE
2736   {
2737 <  ConfigFileEntry.oper_only_umodes |= UMODE_NCHANGE;
2737 >  ConfigGeneral.oper_only_umodes |= UMODE_NCHANGE;
2738   } | T_REJ
2739   {
2740 <  ConfigFileEntry.oper_only_umodes |= UMODE_REJ;
2740 >  ConfigGeneral.oper_only_umodes |= UMODE_REJ;
2741   } | T_UNAUTH
2742   {
2743 <  ConfigFileEntry.oper_only_umodes |= UMODE_UNAUTH;
2743 >  ConfigGeneral.oper_only_umodes |= UMODE_UNAUTH;
2744   } | T_SPY
2745   {
2746 <  ConfigFileEntry.oper_only_umodes |= UMODE_SPY;
2746 >  ConfigGeneral.oper_only_umodes |= UMODE_SPY;
2747   } | T_EXTERNAL
2748   {
2749 <  ConfigFileEntry.oper_only_umodes |= UMODE_EXTERNAL;
2867 < } | T_OPERWALL
2868 < {
2869 <  ConfigFileEntry.oper_only_umodes |= UMODE_OPERWALL;
2749 >  ConfigGeneral.oper_only_umodes |= UMODE_EXTERNAL;
2750   } | T_SERVNOTICE
2751   {
2752 <  ConfigFileEntry.oper_only_umodes |= UMODE_SERVNOTICE;
2752 >  ConfigGeneral.oper_only_umodes |= UMODE_SERVNOTICE;
2753   } | T_INVISIBLE
2754   {
2755 <  ConfigFileEntry.oper_only_umodes |= UMODE_INVISIBLE;
2755 >  ConfigGeneral.oper_only_umodes |= UMODE_INVISIBLE;
2756   } | T_WALLOP
2757   {
2758 <  ConfigFileEntry.oper_only_umodes |= UMODE_WALLOP;
2758 >  ConfigGeneral.oper_only_umodes |= UMODE_WALLOP;
2759   } | T_SOFTCALLERID
2760   {
2761 <  ConfigFileEntry.oper_only_umodes |= UMODE_SOFTCALLERID;
2761 >  ConfigGeneral.oper_only_umodes |= UMODE_SOFTCALLERID;
2762   } | T_CALLERID
2763   {
2764 <  ConfigFileEntry.oper_only_umodes |= UMODE_CALLERID;
2764 >  ConfigGeneral.oper_only_umodes |= UMODE_CALLERID;
2765   } | T_LOCOPS
2766   {
2767 <  ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS;
2767 >  ConfigGeneral.oper_only_umodes |= UMODE_LOCOPS;
2768   } | T_NONONREG
2769   {
2770 <  ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
2770 >  ConfigGeneral.oper_only_umodes |= UMODE_REGONLY;
2771   } | T_FARCONNECT
2772   {
2773 <  ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT;
2773 >  ConfigGeneral.oper_only_umodes |= UMODE_FARCONNECT;
2774   };
2775  
2776   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
2777   {
2778 <  ConfigFileEntry.min_nonwildcard = $3;
2778 >  ConfigGeneral.min_nonwildcard = $3;
2779   };
2780  
2781   general_min_nonwildcard_simple: MIN_NONWILDCARD_SIMPLE '=' NUMBER ';'
2782   {
2783 <  ConfigFileEntry.min_nonwildcard_simple = $3;
2783 >  ConfigGeneral.min_nonwildcard_simple = $3;
2784   };
2785  
2786   general_default_floodcount: DEFAULT_FLOODCOUNT '=' NUMBER ';'
2787   {
2788 <  ConfigFileEntry.default_floodcount = $3;
2788 >  ConfigGeneral.default_floodcount = $3;
2789 > };
2790 >
2791 > general_default_floodtime: DEFAULT_FLOODTIME '=' timespec ';'
2792 > {
2793 >  ConfigGeneral.default_floodtime = $3;
2794   };
2795  
2796  
2797   /***************************************************************************
2798 < *  section channel
2798 > * channel {} section
2799   ***************************************************************************/
2800 < channel_entry: CHANNEL
2916 <  '{' channel_items '}' ';';
2800 > channel_entry: CHANNEL '{' channel_items '}' ';';
2801  
2802   channel_items:      channel_items channel_item | channel_item;
2803   channel_item:       channel_max_bans |
2804 <                    channel_invite_delay |
2804 >                    channel_max_bans_large |
2805 >                    channel_invite_client_count |
2806 >                    channel_invite_client_time |
2807                      channel_invite_delay_channel |
2808 <                    channel_knock_delay |
2808 >                    channel_invite_expire_time |
2809 >                    channel_knock_client_count |
2810 >                    channel_knock_client_time |
2811                      channel_knock_delay_channel |
2812 <                    channel_max_chans_per_user |
2813 <                    channel_max_chans_per_oper |
2814 <                    channel_default_split_user_count |
2815 <                    channel_default_split_server_count |
2928 <                    channel_no_create_on_split |
2929 <                    channel_no_join_on_split |
2930 <                    channel_jflood_count |
2931 <                    channel_jflood_time |
2812 >                    channel_max_channels |
2813 >                    channel_max_invites |
2814 >                    channel_default_join_flood_count |
2815 >                    channel_default_join_flood_time |
2816                      channel_disable_fake_channels |
2817                      error;
2818  
# Line 2937 | Line 2821 | channel_disable_fake_channels: DISABLE_F
2821    ConfigChannel.disable_fake_channels = yylval.number;
2822   };
2823  
2824 < channel_knock_delay: KNOCK_DELAY '=' timespec ';'
2824 > channel_invite_client_count: INVITE_CLIENT_COUNT '=' NUMBER ';'
2825   {
2826 <  ConfigChannel.knock_delay = $3;
2826 >  ConfigChannel.invite_client_count = $3;
2827   };
2828  
2829 < channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2829 > channel_invite_client_time: INVITE_CLIENT_TIME '=' timespec ';'
2830   {
2831 <  ConfigChannel.knock_delay_channel = $3;
2831 >  ConfigChannel.invite_client_time = $3;
2832   };
2833  
2834 < channel_invite_delay: INVITE_DELAY '=' timespec ';'
2834 > channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';'
2835   {
2836 <  ConfigChannel.invite_delay = $3;
2836 >  ConfigChannel.invite_delay_channel = $3;
2837   };
2838  
2839 < channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';'
2839 > channel_invite_expire_time: INVITE_EXPIRE_TIME '=' timespec ';'
2840   {
2841 <  ConfigChannel.invite_delay_channel = $3;
2841 >  ConfigChannel.invite_expire_time = $3;
2842   };
2843  
2844 < channel_max_chans_per_user: MAX_CHANS_PER_USER '=' NUMBER ';'
2844 > channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2845   {
2846 <  ConfigChannel.max_chans_per_user = $3;
2846 >  ConfigChannel.knock_client_count = $3;
2847   };
2848  
2849 < channel_max_chans_per_oper: MAX_CHANS_PER_OPER '=' NUMBER ';'
2849 > channel_knock_client_time: KNOCK_CLIENT_TIME '=' timespec ';'
2850   {
2851 <  ConfigChannel.max_chans_per_oper = $3;
2851 >  ConfigChannel.knock_client_time = $3;
2852   };
2853  
2854 < channel_max_bans: MAX_BANS '=' NUMBER ';'
2854 > channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2855   {
2856 <  ConfigChannel.max_bans = $3;
2856 >  ConfigChannel.knock_delay_channel = $3;
2857   };
2858  
2859 < channel_default_split_user_count: DEFAULT_SPLIT_USER_COUNT '=' NUMBER ';'
2859 > channel_max_channels: MAX_CHANNELS '=' NUMBER ';'
2860   {
2861 <  ConfigChannel.default_split_user_count = $3;
2861 >  ConfigChannel.max_channels = $3;
2862   };
2863  
2864 < channel_default_split_server_count: DEFAULT_SPLIT_SERVER_COUNT '=' NUMBER ';'
2864 > channel_max_invites: MAX_INVITES '=' NUMBER ';'
2865   {
2866 <  ConfigChannel.default_split_server_count = $3;
2866 >  ConfigChannel.max_invites = $3;
2867   };
2868  
2869 < channel_no_create_on_split: NO_CREATE_ON_SPLIT '=' TBOOL ';'
2869 > channel_max_bans: MAX_BANS '=' NUMBER ';'
2870   {
2871 <  ConfigChannel.no_create_on_split = yylval.number;
2871 >  ConfigChannel.max_bans = $3;
2872   };
2873  
2874 < channel_no_join_on_split: NO_JOIN_ON_SPLIT '=' TBOOL ';'
2874 > channel_max_bans_large: MAX_BANS_LARGE '=' NUMBER ';'
2875   {
2876 <  ConfigChannel.no_join_on_split = yylval.number;
2876 >  ConfigChannel.max_bans_large = $3;
2877   };
2878  
2879 < channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';'
2879 > channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';'
2880   {
2881 <  GlobalSetOptions.joinfloodcount = yylval.number;
2881 >  ConfigChannel.default_join_flood_count = yylval.number;
2882   };
2883  
2884 < channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';'
2884 > channel_default_join_flood_time: DEFAULT_JOIN_FLOOD_TIME '=' timespec ';'
2885   {
2886 <  GlobalSetOptions.joinfloodtime = $3;
2886 >  ConfigChannel.default_join_flood_time = $3;
2887   };
2888  
2889 +
2890   /***************************************************************************
2891 < *  section serverhide
2891 > * serverhide {} section
2892   ***************************************************************************/
2893 < serverhide_entry: SERVERHIDE
3009 <  '{' serverhide_items '}' ';';
2893 > serverhide_entry: SERVERHIDE '{' serverhide_items '}' ';';
2894  
2895   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
2896   serverhide_item:    serverhide_flatten_links |
2897 +                    serverhide_flatten_links_delay |
2898 +                    serverhide_flatten_links_file |
2899                      serverhide_disable_remote_commands |
2900                      serverhide_hide_servers |
2901                      serverhide_hide_services |
3016                    serverhide_links_delay |
2902                      serverhide_hidden |
2903                      serverhide_hidden_name |
2904                      serverhide_hide_server_ips |
# Line 3025 | Line 2910 | serverhide_flatten_links: FLATTEN_LINKS
2910      ConfigServerHide.flatten_links = yylval.number;
2911   };
2912  
2913 + serverhide_flatten_links_delay: FLATTEN_LINKS_DELAY '=' timespec ';'
2914 + {
2915 +  if (conf_parser_ctx.pass == 2)
2916 +  {
2917 +    if ($3 > 0)
2918 +    {
2919 +      event_write_links_file.when = $3;
2920 +      event_add(&event_write_links_file, NULL);
2921 +    }
2922 +    else
2923 +     event_delete(&event_write_links_file);
2924 +
2925 +    ConfigServerHide.flatten_links_delay = $3;
2926 +  }
2927 + };
2928 +
2929 + serverhide_flatten_links_file: FLATTEN_LINKS_FILE '=' QSTRING ';'
2930 + {
2931 +  if (conf_parser_ctx.pass == 2)
2932 +  {
2933 +    xfree(ConfigServerHide.flatten_links_file);
2934 +    ConfigServerHide.flatten_links_file = xstrdup(yylval.string);
2935 +  }
2936 + };
2937 +
2938   serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';'
2939   {
2940    if (conf_parser_ctx.pass == 2)
# Line 3047 | Line 2957 | serverhide_hidden_name: HIDDEN_NAME '='
2957   {
2958    if (conf_parser_ctx.pass == 2)
2959    {
2960 <    MyFree(ConfigServerHide.hidden_name);
2960 >    xfree(ConfigServerHide.hidden_name);
2961      ConfigServerHide.hidden_name = xstrdup(yylval.string);
2962    }
2963   };
2964  
3055 serverhide_links_delay: LINKS_DELAY '=' timespec ';'
3056 {
3057  if (conf_parser_ctx.pass == 2)
3058  {
3059    if (($3 > 0) && ConfigServerHide.links_disabled == 1)
3060    {
3061      eventAddIsh("write_links_file", write_links_file, NULL, $3);
3062      ConfigServerHide.links_disabled = 0;
3063    }
3064
3065    ConfigServerHide.links_delay = $3;
3066  }
3067 };
3068
2965   serverhide_hidden: HIDDEN '=' TBOOL ';'
2966   {
2967    if (conf_parser_ctx.pass == 2)

Comparing ircd-hybrid/trunk/src/conf_parser.y (property svn:keywords):
Revision 3762 by michael, Sun Jun 1 19:35:16 2014 UTC vs.
Revision 8792 by michael, Thu Jan 17 18:35:32 2019 UTC

# Line 1 | Line 1
1 < Id Revision
1 > Id

Diff Legend

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