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 7766 by michael, Fri Oct 7 16:27:37 2016 UTC vs.
Revision 9333 by michael, Sat Apr 11 17:01:43 2020 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 2000-2016 ircd-hybrid development team
4 > *  Copyright (c) 2000-2020 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 31 | Line 31
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"
# Line 90 | Line 91 | static struct
91      size,
92      type,
93      port,
94 +    timeout,
95      aftype,
96      ping_freq,
97 <    max_perip,
97 >    max_perip_local,
98 >    max_perip_global,
99      con_freq,
100      min_idle,
101      max_idle,
102      max_total,
100 –    max_global,
101 –    max_local,
103      max_sendq,
104      max_recvq,
105      max_channels,
# Line 110 | Line 111 | static struct
111   static void
112   reset_block_state(void)
113   {
114 <  dlink_node *node = NULL, *node_next = NULL;
114 >  dlink_node *node, *node_next;
115 >  dlink_list *tab[] = { &block_state.mask.list,
116 >                        &block_state.leaf.list, &block_state.hub.list, NULL };
117  
118 <  DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head)
118 >  for (dlink_list **list = tab; *list; ++list)
119    {
120 <    xfree(node->data);
121 <    dlinkDelete(node, &block_state.mask.list);
122 <    free_dlink_node(node);
123 <  }
124 <
125 <  DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head)
123 <  {
124 <    xfree(node->data);
125 <    dlinkDelete(node, &block_state.leaf.list);
126 <    free_dlink_node(node);
127 <  }
128 <
129 <  DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head)
130 <  {
131 <    xfree(node->data);
132 <    dlinkDelete(node, &block_state.hub.list);
133 <    free_dlink_node(node);
120 >    DLINK_FOREACH_SAFE(node, node_next, (*list)->head)
121 >    {
122 >      xfree(node->data);
123 >      dlinkDelete(node, *list);
124 >      free_dlink_node(node);
125 >    }
126    }
127  
128    memset(&block_state, 0, sizeof(block_state));
# Line 155 | Line 147 | reset_block_state(void)
147   %token  CALLER_ID_WAIT
148   %token  CAN_FLOOD
149   %token  CHANNEL
158 – %token  CHECK_CACHE
150   %token  CIDR_BITLEN_IPV4
151   %token  CIDR_BITLEN_IPV6
152   %token  CLASS
# Line 164 | Line 155 | reset_block_state(void)
155   %token  CONNECTFREQ
156   %token  CYCLE_ON_HOST_CHANGE
157   %token  DEFAULT_FLOODCOUNT
158 + %token  DEFAULT_FLOODTIME
159   %token  DEFAULT_JOIN_FLOOD_COUNT
160   %token  DEFAULT_JOIN_FLOOD_TIME
161   %token  DEFAULT_MAX_CLIENTS
# Line 177 | Line 169 | reset_block_state(void)
169   %token  DLINE_MIN_CIDR6
170   %token  DOTS_IN_IDENT
171   %token  EMAIL
172 + %token  ENABLE_EXTBANS
173   %token  ENCRYPTED
174   %token  EXCEED_LIMIT
175   %token  EXEMPT
176 + %token  EXPIRATION
177   %token  FAILED_OPER_NOTICE
178   %token  FLATTEN_LINKS
179   %token  FLATTEN_LINKS_DELAY
# Line 197 | Line 191 | reset_block_state(void)
191   %token  HOST
192   %token  HUB
193   %token  HUB_MASK
200 – %token  IGNORE_BOGUS_TS
194   %token  INVISIBLE_ON_CONNECT
195   %token  INVITE_CLIENT_COUNT
196   %token  INVITE_CLIENT_TIME
197   %token  INVITE_DELAY_CHANNEL
198 + %token  INVITE_EXPIRE_TIME
199   %token  IP
200   %token  IRCD_AUTH
201   %token  IRCD_FLAGS
# Line 217 | Line 211 | reset_block_state(void)
211   %token  KNOCK_CLIENT_TIME
212   %token  KNOCK_DELAY_CHANNEL
213   %token  LEAF_MASK
220 – %token  LIBGEOIP_DATABASE_OPTIONS
221 – %token  LIBGEOIP_IPV4_DATABASE_FILE
222 – %token  LIBGEOIP_IPV6_DATABASE_FILE
214   %token  LISTEN
215   %token  MASK
216   %token  MAX_ACCEPT
217   %token  MAX_BANS
218 + %token  MAX_BANS_LARGE
219   %token  MAX_CHANNELS
228 – %token  MAX_GLOBAL
220   %token  MAX_IDLE
221   %token  MAX_INVITES
231 – %token  MAX_LOCAL
222   %token  MAX_NICK_CHANGES
223   %token  MAX_NICK_LENGTH
224   %token  MAX_NICK_TIME
# Line 236 | Line 226 | reset_block_state(void)
226   %token  MAX_TARGETS
227   %token  MAX_TOPIC_LENGTH
228   %token  MAX_WATCH
239 – %token  MEMORY_CACHE
229   %token  MIN_IDLE
230   %token  MIN_NONWILDCARD
231   %token  MIN_NONWILDCARD_SIMPLE
243 – %token  MMAP_CACHE
232   %token  MODULE
233   %token  MODULES
234   %token  MOTD
# Line 254 | Line 242 | reset_block_state(void)
242   %token  NO_TILDE
243   %token  NUMBER
244   %token  NUMBER_PER_CIDR
245 < %token  NUMBER_PER_IP
245 > %token  NUMBER_PER_IP_GLOBAL
246 > %token  NUMBER_PER_IP_LOCAL
247   %token  OPER_ONLY_UMODES
248   %token  OPER_UMODES
249   %token  OPERATOR
# Line 284 | Line 273 | reset_block_state(void)
273   %token  SERVERINFO
274   %token  SHORT_MOTD
275   %token  SPOOF
287 – %token  SPOOF_NOTICE
276   %token  SQUIT
289 – %token  SSL_CERTIFICATE_FILE
290 – %token  SSL_CERTIFICATE_FINGERPRINT
291 – %token  SSL_CONNECTION_REQUIRED
292 – %token  SSL_DH_ELLIPTIC_CURVE
293 – %token  SSL_DH_PARAM_FILE
294 – %token  SSL_MESSAGE_DIGEST_ALGORITHM
295 – %token  STANDARD
277   %token  STATS_E_DISABLED
278   %token  STATS_I_OPER_ONLY
279   %token  STATS_K_OPER_ONLY
# Line 301 | Line 282 | reset_block_state(void)
282   %token  STATS_P_OPER_ONLY
283   %token  STATS_U_OPER_ONLY
284   %token  T_ALL
285 + %token  T_BIND
286   %token  T_BOTS
287   %token  T_CALLERID
288   %token  T_CCONN
# Line 336 | Line 318 | reset_block_state(void)
318   %token  T_SKILL
319   %token  T_SOFTCALLERID
320   %token  T_SPY
339 – %token  T_SSL
340 – %token  T_SSL_CIPHER_LIST
321   %token  T_TARGET
322 + %token  T_TLS
323   %token  T_UMODES
324   %token  T_UNAUTH
325   %token  T_UNDLINE
# Line 351 | Line 332 | reset_block_state(void)
332   %token  TBOOL
333   %token  THROTTLE_COUNT
334   %token  THROTTLE_TIME
335 < %token  TKLINE_EXPIRE_NOTICES
336 < %token  TMASKED
335 > %token  TIMEOUT
336 > %token  TLS_CERTIFICATE_FILE
337 > %token  TLS_CERTIFICATE_FINGERPRINT
338 > %token  TLS_CIPHER_LIST
339 > %token  TLS_CIPHER_SUITES
340 > %token  TLS_CONNECTION_REQUIRED
341 > %token  TLS_DH_PARAM_FILE
342 > %token  TLS_MESSAGE_DIGEST_ALGORITHM
343 > %token  TLS_SUPPORTED_GROUPS
344   %token  TS_MAX_DELTA
345   %token  TS_WARN_DELTA
346   %token  TWODOTS
# Line 448 | Line 436 | modules_path: PATH '=' QSTRING ';'
436  
437  
438   /***************************************************************************
439 < * serverinfo {}  section
439 > * serverinfo {} section
440   ***************************************************************************/
441   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
442  
443   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
444   serverinfo_item:        serverinfo_name |
457 –                        serverinfo_vhost |
445                          serverinfo_hub |
446                          serverinfo_description |
447                          serverinfo_network_name |
# Line 462 | Line 449 | serverinfo_item:        serverinfo_name
449                          serverinfo_default_max_clients |
450                          serverinfo_max_nick_length |
451                          serverinfo_max_topic_length |
452 <                        serverinfo_ssl_dh_param_file |
453 <                        serverinfo_ssl_dh_elliptic_curve |
452 >                        serverinfo_tls_dh_param_file |
453 >                        serverinfo_tls_supported_groups |
454                          serverinfo_rsa_private_key_file |
468 –                        serverinfo_vhost6 |
455                          serverinfo_sid |
456 <                        serverinfo_ssl_certificate_file |
457 <                        serverinfo_ssl_cipher_list |
458 <                        serverinfo_ssl_message_digest_algorithm |
459 <                        serverinfo_libgeoip_database_options |
474 <                        serverinfo_libgeoip_ipv4_database_file |
475 <                        serverinfo_libgeoip_ipv6_database_file |
456 >                        serverinfo_tls_certificate_file |
457 >                        serverinfo_tls_cipher_list |
458 >                        serverinfo_tls_cipher_suites |
459 >                        serverinfo_tls_message_digest_algorithm |
460                          error ';' ;
461  
462  
463 < serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
463 > serverinfo_tls_certificate_file: TLS_CERTIFICATE_FILE '=' QSTRING ';'
464   {
465    if (conf_parser_ctx.pass == 2)
466    {
467 <    xfree(ConfigServerInfo.ssl_certificate_file);
468 <    ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string);
467 >    xfree(ConfigServerInfo.tls_certificate_file);
468 >    ConfigServerInfo.tls_certificate_file = xstrdup(yylval.string);
469    }
470   };
471  
# Line 494 | Line 478 | serverinfo_rsa_private_key_file: RSA_PRI
478    }
479   };
480  
481 < serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
481 > serverinfo_tls_dh_param_file: TLS_DH_PARAM_FILE '=' QSTRING ';'
482   {
483    if (conf_parser_ctx.pass == 2)
484    {
485 <    xfree(ConfigServerInfo.ssl_dh_param_file);
486 <    ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string);
485 >    xfree(ConfigServerInfo.tls_dh_param_file);
486 >    ConfigServerInfo.tls_dh_param_file = xstrdup(yylval.string);
487    }
488   };
489  
490 < serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
490 > serverinfo_tls_cipher_list: TLS_CIPHER_LIST '=' QSTRING ';'
491   {
492    if (conf_parser_ctx.pass == 2)
493    {
494 <    xfree(ConfigServerInfo.ssl_cipher_list);
495 <    ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string);
494 >    xfree(ConfigServerInfo.tls_cipher_list);
495 >    ConfigServerInfo.tls_cipher_list = xstrdup(yylval.string);
496    }
497   };
498  
499 < serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
516 < {
517 <  if (conf_parser_ctx.pass == 2)
518 <  {
519 <    xfree(ConfigServerInfo.ssl_message_digest_algorithm);
520 <    ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string);
521 <  }
522 < }
523 <
524 < serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
499 > serverinfo_tls_cipher_suites: TLS_CIPHER_SUITES '=' QSTRING ';'
500   {
501    if (conf_parser_ctx.pass == 2)
502    {
503 <    xfree(ConfigServerInfo.ssl_dh_elliptic_curve);
504 <    ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string);
503 >    xfree(ConfigServerInfo.tls_cipher_suites);
504 >    ConfigServerInfo.tls_cipher_suites = xstrdup(yylval.string);
505    }
506   };
507  
508 < serverinfo_libgeoip_database_options: LIBGEOIP_DATABASE_OPTIONS
534 < {
535 <  if (conf_parser_ctx.pass == 1)
536 <    ConfigServerInfo.libgeoip_database_options = 0;
537 < } '='  options_items ';';
538 <
539 < options_items: options_items ',' options_item | options_item;
540 < options_item: STANDARD
541 < {
542 < #ifdef HAVE_LIBGEOIP
543 <  if (conf_parser_ctx.pass == 1)
544 <    ConfigServerInfo.libgeoip_database_options |= GEOIP_STANDARD;
545 < #endif
546 < } | MEMORY_CACHE
547 < {
548 < #ifdef HAVE_LIBGEOIP
549 <  if (conf_parser_ctx.pass == 1)
550 <    ConfigServerInfo.libgeoip_database_options |= GEOIP_MEMORY_CACHE;
551 < #endif
552 < } | MMAP_CACHE
553 < {
554 < #ifdef HAVE_LIBGEOIP
555 <  if (conf_parser_ctx.pass == 1)
556 <    ConfigServerInfo.libgeoip_database_options |= GEOIP_MMAP_CACHE;
557 < #endif
558 < } | CHECK_CACHE
559 < {
560 < #ifdef HAVE_LIBGEOIP
561 <  if (conf_parser_ctx.pass == 1)
562 <    ConfigServerInfo.libgeoip_database_options |= GEOIP_CHECK_CACHE;
563 < #endif
564 < };
565 <
566 < serverinfo_libgeoip_ipv4_database_file:  LIBGEOIP_IPV4_DATABASE_FILE '=' QSTRING ';'
508 > serverinfo_tls_message_digest_algorithm: TLS_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
509   {
510    if (conf_parser_ctx.pass == 2)
511    {
512 <    xfree(ConfigServerInfo.libgeoip_ipv4_database_file);
513 <    ConfigServerInfo.libgeoip_ipv4_database_file = xstrdup(yylval.string);
572 <
573 < #ifdef HAVE_LIBGEOIP
574 <    if (GeoIPv4_ctx)
575 <      GeoIP_delete(GeoIPv4_ctx);
576 <    GeoIPv4_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
577 < #endif
512 >    xfree(ConfigServerInfo.tls_message_digest_algorithm);
513 >    ConfigServerInfo.tls_message_digest_algorithm = xstrdup(yylval.string);
514    }
515 < };
515 > }
516  
517 < serverinfo_libgeoip_ipv6_database_file:  LIBGEOIP_IPV6_DATABASE_FILE '=' QSTRING ';'
517 > serverinfo_tls_supported_groups: TLS_SUPPORTED_GROUPS '=' QSTRING ';'
518   {
519    if (conf_parser_ctx.pass == 2)
520    {
521 <    xfree(ConfigServerInfo.libgeoip_ipv6_database_file);
522 <    ConfigServerInfo.libgeoip_ipv6_database_file = xstrdup(yylval.string);
587 <
588 < #ifdef HAVE_LIBGEOIP
589 <    if (GeoIPv6_ctx)
590 <      GeoIP_delete(GeoIPv6_ctx);
591 <    GeoIPv6_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
592 < #endif
521 >    xfree(ConfigServerInfo.tls_supported_groups);
522 >    ConfigServerInfo.tls_supported_groups = xstrdup(yylval.string);
523    }
524   };
525  
526   serverinfo_name: NAME '=' QSTRING ';'
527   {
528    /* This isn't rehashable */
529 <  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
529 >  if (conf_parser_ctx.pass == 2 && ConfigServerInfo.name == NULL)
530    {
531 <    if (valid_servname(yylval.string))
531 >    if (server_valid_name(yylval.string) == true)
532        ConfigServerInfo.name = xstrdup(yylval.string);
533      else
534      {
# Line 611 | Line 541 | serverinfo_name: NAME '=' QSTRING ';'
541   serverinfo_sid: IRCD_SID '=' QSTRING ';'
542   {
543    /* This isn't rehashable */
544 <  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
544 >  if (conf_parser_ctx.pass == 2 && ConfigServerInfo.sid == NULL)
545    {
546      if (valid_sid(yylval.string))
547        ConfigServerInfo.sid = xstrdup(yylval.string);
# Line 637 | Line 567 | serverinfo_network_name: NETWORK_NAME '=
567   {
568    if (conf_parser_ctx.pass == 2)
569    {
570 <    char *p;
570 >    char *p = strchr(yylval.string, ' ');
571  
572 <    if ((p = strchr(yylval.string, ' ')))
572 >    if (p)
573        *p = '\0';
574  
575      xfree(ConfigServerInfo.network_name);
# Line 656 | Line 586 | serverinfo_network_desc: NETWORK_DESC '=
586    ConfigServerInfo.network_desc = xstrdup(yylval.string);
587   };
588  
659 – serverinfo_vhost: VHOST '=' QSTRING ';'
660 – {
661 –  if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
662 –  {
663 –    struct addrinfo hints, *res;
664 –
665 –    memset(&hints, 0, sizeof(hints));
666 –
667 –    hints.ai_family   = AF_UNSPEC;
668 –    hints.ai_socktype = SOCK_STREAM;
669 –    hints.ai_flags    = AI_PASSIVE | AI_NUMERICHOST;
670 –
671 –    if (getaddrinfo(yylval.string, NULL, &hints, &res))
672 –      ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string);
673 –    else
674 –    {
675 –      assert(res);
676 –
677 –      memcpy(&ConfigServerInfo.ip, res->ai_addr, res->ai_addrlen);
678 –      ConfigServerInfo.ip.ss.ss_family = res->ai_family;
679 –      ConfigServerInfo.ip.ss_len = res->ai_addrlen;
680 –      freeaddrinfo(res);
681 –
682 –      ConfigServerInfo.specific_ipv4_vhost = 1;
683 –    }
684 –  }
685 – };
686 –
687 – serverinfo_vhost6: VHOST6 '=' QSTRING ';'
688 – {
689 –  if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
690 –  {
691 –    struct addrinfo hints, *res;
692 –
693 –    memset(&hints, 0, sizeof(hints));
694 –
695 –    hints.ai_family   = AF_UNSPEC;
696 –    hints.ai_socktype = SOCK_STREAM;
697 –    hints.ai_flags    = AI_PASSIVE | AI_NUMERICHOST;
698 –
699 –    if (getaddrinfo(yylval.string, NULL, &hints, &res))
700 –      ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string);
701 –    else
702 –    {
703 –      assert(res);
704 –
705 –      memcpy(&ConfigServerInfo.ip6, res->ai_addr, res->ai_addrlen);
706 –      ConfigServerInfo.ip6.ss.ss_family = res->ai_family;
707 –      ConfigServerInfo.ip6.ss_len = res->ai_addrlen;
708 –      freeaddrinfo(res);
709 –
710 –      ConfigServerInfo.specific_ipv6_vhost = 1;
711 –    }
712 –  }
713 – };
714 –
589   serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';'
590   {
591    if (conf_parser_ctx.pass != 2)
592      break;
593  
594 <  if ($3 < MAXCLIENTS_MIN)
594 >  if ($3 < 1)
595    {
596 <    char buf[IRCD_BUFSIZE] = "";
597 <
724 <    snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
725 <    conf_error_report(buf);
726 <    ConfigServerInfo.default_max_clients = MAXCLIENTS_MIN;
596 >    conf_error_report("default_max_clients too low, setting to 1");
597 >    ConfigServerInfo.default_max_clients = 1;
598    }
599    else if ($3 > MAXCLIENTS_MAX)
600    {
601 <    char buf[IRCD_BUFSIZE] = "";
601 >    char buf[IRCD_BUFSIZE];
602  
603 <    snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
603 >    snprintf(buf, sizeof(buf), "default_max_clients too high, setting to %d", MAXCLIENTS_MAX);
604      conf_error_report(buf);
605 +
606      ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX;
607    }
608    else
# Line 749 | Line 621 | serverinfo_max_nick_length: MAX_NICK_LEN
621    }
622    else if ($3 > NICKLEN)
623    {
624 <    char buf[IRCD_BUFSIZE] = "";
624 >    char buf[IRCD_BUFSIZE];
625  
626      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
627      conf_error_report(buf);
628 +
629      ConfigServerInfo.max_nick_length = NICKLEN;
630    }
631    else
# Line 771 | Line 644 | serverinfo_max_topic_length: MAX_TOPIC_L
644    }
645    else if ($3 > TOPICLEN)
646    {
647 <    char buf[IRCD_BUFSIZE] = "";
647 >    char buf[IRCD_BUFSIZE];
648  
649      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
650      conf_error_report(buf);
651 +
652      ConfigServerInfo.max_topic_length = TOPICLEN;
653    }
654    else
# Line 791 | Line 665 | serverinfo_hub: HUB '=' TBOOL ';'
665   /***************************************************************************
666   * admin {} section
667   ***************************************************************************/
668 < admin_entry: ADMIN  '{' admin_items '}' ';' ;
668 > admin_entry: ADMIN '{' admin_items '}' ';' ;
669  
670   admin_items: admin_items admin_item | admin_item;
671   admin_item:  admin_name |
# Line 836 | Line 710 | motd_entry: MOTD
710      reset_block_state();
711   } '{' motd_items '}' ';'
712   {
713 <  dlink_node *node = NULL;
713 >  dlink_node *node;
714  
715    if (conf_parser_ctx.pass != 2)
716      break;
# Line 929 | Line 803 | pseudo_target: T_TARGET '=' QSTRING ';'
803   /***************************************************************************
804   * log {} section
805   ***************************************************************************/
806 < logging_entry:          T_LOG  '{' logging_items '}' ';' ;
806 > logging_entry:          T_LOG '{' logging_items '}' ';' ;
807   logging_items:          logging_items logging_item | logging_item ;
808  
809   logging_item:           logging_use_logging | logging_file_entry |
# Line 981 | Line 855 | logging_file_type: TYPE
855   {
856    if (conf_parser_ctx.pass == 2)
857      block_state.type.value = 0;
858 < } '='  logging_file_type_items ';' ;
858 > } '=' logging_file_type_items ';' ;
859  
860   logging_file_type_items: logging_file_type_items ',' logging_file_type_item | logging_file_type_item;
861   logging_file_type_item:  USER
# Line 1031 | Line 905 | oper_entry: OPERATOR
905    block_state.flags.value |= CONF_FLAGS_ENCRYPTED;
906   } '{' oper_items '}' ';'
907   {
908 <  dlink_node *node = NULL;
908 >  dlink_node *node;
909  
910    if (conf_parser_ctx.pass != 2)
911      break;
# Line 1044 | Line 918 | oper_entry: OPERATOR
918  
919    DLINK_FOREACH(node, block_state.mask.list.head)
920    {
1047 –    struct MaskItem *conf = NULL;
921      struct split_nuh_item nuh;
922      char *s = node->data;
923  
# Line 1055 | Line 928 | oper_entry: OPERATOR
928      nuh.nickptr  = NULL;
929      nuh.userptr  = block_state.user.buf;
930      nuh.hostptr  = block_state.host.buf;
931 +
932      nuh.nicksize = 0;
933      nuh.usersize = sizeof(block_state.user.buf);
934      nuh.hostsize = sizeof(block_state.host.buf);
935 +
936      split_nuh(&nuh);
937  
938 <    conf         = conf_make(CONF_OPER);
939 <    conf->name   = xstrdup(block_state.name.buf);
940 <    conf->user   = xstrdup(block_state.user.buf);
941 <    conf->host   = xstrdup(block_state.host.buf);
938 >    struct MaskItem *conf = conf_make(CONF_OPER);
939 >    conf->addr = xcalloc(sizeof(*conf->addr));
940 >    conf->name = xstrdup(block_state.name.buf);
941 >    conf->user = xstrdup(block_state.user.buf);
942 >    conf->host = xstrdup(block_state.host.buf);
943  
944      if (block_state.cert.buf[0])
945        conf->certfp = xstrdup(block_state.cert.buf);
# Line 1077 | Line 953 | oper_entry: OPERATOR
953      conf->flags = block_state.flags.value;
954      conf->modes = block_state.modes.value;
955      conf->port  = block_state.port.value;
956 <    conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits);
956 >    conf->htype = parse_netmask(conf->host, conf->addr, &conf->bits);
957  
958      conf_add_class_to_conf(conf, block_state.class.buf);
959    }
# Line 1091 | Line 967 | oper_item:      oper_name |
967                  oper_umodes |
968                  oper_class |
969                  oper_encrypted |
970 <                oper_ssl_certificate_fingerprint |
971 <                oper_ssl_connection_required |
970 >                oper_tls_certificate_fingerprint |
971 >                oper_tls_connection_required |
972                  oper_flags |
973                  error ';' ;
974  
# Line 1131 | Line 1007 | oper_encrypted: ENCRYPTED '=' TBOOL ';'
1007      block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED;
1008   };
1009  
1010 < oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1010 > oper_tls_certificate_fingerprint: TLS_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1011   {
1012    if (conf_parser_ctx.pass == 2)
1013      strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf));
1014   };
1015  
1016 < oper_ssl_connection_required: SSL_CONNECTION_REQUIRED '=' TBOOL ';'
1016 > oper_tls_connection_required: TLS_CONNECTION_REQUIRED '=' TBOOL ';'
1017   {
1018    if (conf_parser_ctx.pass != 2)
1019      break;
1020  
1021    if (yylval.number)
1022 <    block_state.flags.value |= CONF_FLAGS_SSL;
1022 >    block_state.flags.value |= CONF_FLAGS_TLS;
1023    else
1024 <    block_state.flags.value &= ~CONF_FLAGS_SSL;
1024 >    block_state.flags.value &= ~CONF_FLAGS_TLS;
1025   };
1026  
1027   oper_class: CLASS '=' QSTRING ';'
# Line 1158 | Line 1034 | oper_umodes: T_UMODES
1034   {
1035    if (conf_parser_ctx.pass == 2)
1036      block_state.modes.value = 0;
1037 < } '='  oper_umodes_items ';' ;
1037 > } '=' oper_umodes_items ';' ;
1038  
1039   oper_umodes_items: oper_umodes_items ',' oper_umodes_item | oper_umodes_item;
1040   oper_umodes_item:  T_BOTS
# Line 1249 | Line 1125 | oper_umodes_item:  T_BOTS
1125   {
1126    if (conf_parser_ctx.pass == 2)
1127      block_state.modes.value |= UMODE_FARCONNECT;
1128 + } | EXPIRATION
1129 + {
1130 +  if (conf_parser_ctx.pass == 2)
1131 +    block_state.modes.value |= UMODE_EXPIRATION;
1132   };
1133  
1134   oper_flags: IRCD_FLAGS
1135   {
1136    if (conf_parser_ctx.pass == 2)
1137      block_state.port.value = 0;
1138 < } '='  oper_flags_items ';';
1138 > } '=' oper_flags_items ';';
1139  
1140   oper_flags_items: oper_flags_items ',' oper_flags_item | oper_flags_item;
1141   oper_flags_item: KILL ':' REMOTE
# Line 1394 | Line 1274 | class_entry: CLASS
1274    block_state.max_recvq.value = DEFAULT_RECVQ;
1275   } '{' class_items '}' ';'
1276   {
1397 –  struct ClassItem *class = NULL;
1398 –
1277    if (conf_parser_ctx.pass != 1)
1278      break;
1279  
1280    if (!block_state.class.buf[0])
1281      break;
1282  
1283 <  if (!(class = class_find(block_state.class.buf, 0)))
1283 >  struct ClassItem *class = class_find(block_state.class.buf, false);
1284 >  if (class == NULL)
1285      class = class_make();
1286  
1287 <  class->active = 1;
1287 >  class->active = true;
1288    xfree(class->name);
1289    class->name = xstrdup(block_state.class.buf);
1290    class->ping_freq = block_state.ping_freq.value;
1291 <  class->max_perip = block_state.max_perip.value;
1291 >  class->max_perip_local = block_state.max_perip_local.value;
1292 >  class->max_perip_global = block_state.max_perip_global.value;
1293    class->con_freq = block_state.con_freq.value;
1294    class->max_total = block_state.max_total.value;
1415 –  class->max_global = block_state.max_global.value;
1416 –  class->max_local = block_state.max_local.value;
1295    class->max_sendq = block_state.max_sendq.value;
1296    class->max_recvq = block_state.max_recvq.value;
1297    class->max_channels = block_state.max_channels.value;
# Line 1429 | Line 1307 | class_entry: CLASS
1307    class->min_idle = block_state.min_idle.value;
1308    class->max_idle = block_state.max_idle.value;
1309  
1310 <  rebuild_cidr_list(class);
1311 <
1310 >  bool diff = (class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value ||
1311 >               class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value);
1312    class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value;
1313    class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value;
1314    class->number_per_cidr = block_state.number_per_cidr.value;
1315 +
1316 +  if (diff)
1317 +    class_ip_limit_rebuild(class);
1318   };
1319  
1320   class_items:    class_items class_item | class_item;
# Line 1442 | Line 1323 | class_item:     class_name |
1323                  class_cidr_bitlen_ipv6 |
1324                  class_ping_time |
1325                  class_number_per_cidr |
1326 <                class_number_per_ip |
1326 >                class_number_per_ip_local |
1327 >                class_number_per_ip_global |
1328                  class_connectfreq |
1329                  class_max_channels |
1330                  class_max_number |
1449 –                class_max_global |
1450 –                class_max_local |
1331                  class_sendq |
1332                  class_recvq |
1333                  class_min_idle |
# Line 1467 | Line 1347 | class_ping_time: PING_TIME '=' timespec
1347      block_state.ping_freq.value = $3;
1348   };
1349  
1350 < class_number_per_ip: NUMBER_PER_IP '=' NUMBER ';'
1350 > class_number_per_ip_local: NUMBER_PER_IP_LOCAL '=' NUMBER ';'
1351   {
1352    if (conf_parser_ctx.pass == 1)
1353 <    block_state.max_perip.value = $3;
1353 >    block_state.max_perip_local.value = $3;
1354 > };
1355 >
1356 > class_number_per_ip_global: NUMBER_PER_IP_GLOBAL '=' NUMBER ';'
1357 > {
1358 >  if (conf_parser_ctx.pass == 1)
1359 >    block_state.max_perip_global.value = $3;
1360   };
1361  
1362   class_connectfreq: CONNECTFREQ '=' timespec ';'
# Line 1491 | Line 1377 | class_max_number: MAX_NUMBER '=' NUMBER
1377      block_state.max_total.value = $3;
1378   };
1379  
1494 – class_max_global: MAX_GLOBAL '=' NUMBER ';'
1495 – {
1496 –  if (conf_parser_ctx.pass == 1)
1497 –    block_state.max_global.value = $3;
1498 – };
1499 –
1500 – class_max_local: MAX_LOCAL '=' NUMBER ';'
1501 – {
1502 –  if (conf_parser_ctx.pass == 1)
1503 –    block_state.max_local.value = $3;
1504 – };
1505 –
1380   class_sendq: SENDQ '=' sizespec ';'
1381   {
1382    if (conf_parser_ctx.pass == 1)
# Line 1556 | Line 1430 | class_flags: IRCD_FLAGS
1430   {
1431    if (conf_parser_ctx.pass == 1)
1432      block_state.flags.value &= CLASS_FLAGS_FAKE_IDLE;
1433 < } '='  class_flags_items ';';
1433 > } '=' class_flags_items ';';
1434  
1435   class_flags_items: class_flags_items ',' class_flags_item | class_flags_item;
1436   class_flags_item: RANDOM_IDLE
# Line 1582 | Line 1456 | listen_entry: LISTEN
1456   listen_flags: IRCD_FLAGS
1457   {
1458    block_state.flags.value = 0;
1459 < } '='  listen_flags_items ';';
1459 > } '=' listen_flags_items ';';
1460  
1461   listen_flags_items: listen_flags_items ',' listen_flags_item | listen_flags_item;
1462 < listen_flags_item: T_SSL
1462 > listen_flags_item: T_TLS
1463   {
1464    if (conf_parser_ctx.pass == 2)
1465 <    block_state.flags.value |= LISTENER_SSL;
1465 >    block_state.flags.value |= LISTENER_TLS;
1466   } | HIDDEN
1467   {
1468    if (conf_parser_ctx.pass == 2)
# Line 1611 | Line 1485 | port_item: NUMBER
1485    if (conf_parser_ctx.pass == 2)
1486    {
1487   #ifndef HAVE_TLS
1488 <    if (block_state.flags.value & LISTENER_SSL)
1488 >    if (block_state.flags.value & LISTENER_TLS)
1489      {
1490        conf_error_report("TLS not available - port closed");
1491        break;
# Line 1624 | Line 1498 | port_item: NUMBER
1498    if (conf_parser_ctx.pass == 2)
1499    {
1500   #ifndef HAVE_TLS
1501 <    if (block_state.flags.value & LISTENER_SSL)
1501 >    if (block_state.flags.value & LISTENER_TLS)
1502      {
1503        conf_error_report("TLS not available - port closed");
1504        break;
# Line 1658 | Line 1532 | auth_entry: IRCD_AUTH
1532      reset_block_state();
1533   } '{' auth_items '}' ';'
1534   {
1535 <  dlink_node *node = NULL;
1535 >  dlink_node *node;
1536  
1537    if (conf_parser_ctx.pass != 2)
1538      break;
1539  
1540    DLINK_FOREACH(node, block_state.mask.list.head)
1541    {
1668 –    struct MaskItem *conf = NULL;
1542      struct split_nuh_item nuh;
1543      char *s = node->data;
1544  
# Line 1676 | Line 1549 | auth_entry: IRCD_AUTH
1549      nuh.nickptr  = NULL;
1550      nuh.userptr  = block_state.user.buf;
1551      nuh.hostptr  = block_state.host.buf;
1552 +
1553      nuh.nicksize = 0;
1554      nuh.usersize = sizeof(block_state.user.buf);
1555      nuh.hostsize = sizeof(block_state.host.buf);
1556 +
1557      split_nuh(&nuh);
1558  
1559 <    conf        = conf_make(CONF_CLIENT);
1560 <    conf->user  = xstrdup(block_state.user.buf);
1561 <    conf->host  = xstrdup(block_state.host.buf);
1559 >    struct MaskItem *conf = conf_make(CONF_CLIENT);
1560 >    conf->user = xstrdup(block_state.user.buf);
1561 >    conf->host = xstrdup(block_state.host.buf);
1562  
1563      if (block_state.rpass.buf[0])
1564        conf->passwd = xstrdup(block_state.rpass.buf);
# Line 1691 | Line 1566 | auth_entry: IRCD_AUTH
1566        conf->name = xstrdup(block_state.name.buf);
1567  
1568      conf->flags = block_state.flags.value;
1569 <    conf->port  = block_state.port.value;
1569 >    conf->port = block_state.port.value;
1570  
1571      conf_add_class_to_conf(conf, block_state.class.buf);
1572      add_conf_by_address(CONF_CLIENT, conf);
# Line 1742 | Line 1617 | auth_flags: IRCD_FLAGS
1617   {
1618    if (conf_parser_ctx.pass == 2)
1619      block_state.flags.value &= (CONF_FLAGS_ENCRYPTED | CONF_FLAGS_SPOOF_IP);
1620 < } '='  auth_flags_items ';';
1620 > } '=' auth_flags_items ';';
1621  
1622   auth_flags_items: auth_flags_items ',' auth_flags_item | auth_flags_item;
1623 < auth_flags_item: SPOOF_NOTICE
1749 < {
1750 <  if (conf_parser_ctx.pass == 2)
1751 <    block_state.flags.value |= CONF_FLAGS_SPOOF_NOTICE;
1752 < } | EXCEED_LIMIT
1623 > auth_flags_item: EXCEED_LIMIT
1624   {
1625    if (conf_parser_ctx.pass == 2)
1626      block_state.flags.value |= CONF_FLAGS_NOLIMIT;
# Line 1873 | Line 1744 | service_name: NAME '=' QSTRING ';'
1744    if (conf_parser_ctx.pass != 2)
1745      break;
1746  
1747 <  if (valid_servname(yylval.string))
1747 >  if (server_valid_name(yylval.string) == true)
1748    {
1749      struct ServiceItem *service = service_make();
1750      service->name = xstrdup(yylval.string);
# Line 2078 | Line 1949 | connect_entry: CONNECT
1949    reset_block_state();
1950    block_state.aftype.value = AF_INET;
1951    block_state.port.value = PORTNUM;
1952 +  block_state.timeout.value = CONNECTTIMEOUT;
1953   } '{' connect_items '}' ';'
1954   {
2083 –  struct MaskItem *conf = NULL;
1955    struct addrinfo hints, *res;
1956  
1957    if (conf_parser_ctx.pass != 2)
# Line 2094 | Line 1965 | connect_entry: CONNECT
1965        !block_state.spass.buf[0])
1966      break;
1967  
1968 +  if (server_valid_name(block_state.name.buf) == false)
1969 +    break;
1970 +
1971    if (has_wildcards(block_state.name.buf) ||
1972        has_wildcards(block_state.host.buf))
1973      break;
1974  
1975 <  conf = conf_make(CONF_SERVER);
1975 >  struct MaskItem *conf = conf_make(CONF_SERVER);
1976 >  conf->addr = xcalloc(sizeof(*conf->addr));
1977    conf->port = block_state.port.value;
1978 +  conf->timeout = block_state.timeout.value;
1979    conf->flags = block_state.flags.value;
1980    conf->aftype = block_state.aftype.value;
1981    conf->host = xstrdup(block_state.host.buf);
# Line 2125 | Line 2001 | connect_entry: CONNECT
2001      hints.ai_flags    = AI_PASSIVE | AI_NUMERICHOST;
2002  
2003      if (getaddrinfo(block_state.bind.buf, NULL, &hints, &res))
2004 <      ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf);
2004 >      ilog(LOG_TYPE_IRCD, "Invalid netmask for server bind(%s)", block_state.bind.buf);
2005      else
2006      {
2007        assert(res);
2008  
2009 <      memcpy(&conf->bind, res->ai_addr, res->ai_addrlen);
2010 <      conf->bind.ss.ss_family = res->ai_family;
2011 <      conf->bind.ss_len = res->ai_addrlen;
2009 >      conf->bind = xcalloc(sizeof(*conf->bind));
2010 >
2011 >      memcpy(conf->bind, res->ai_addr, res->ai_addrlen);
2012 >      conf->bind->ss_len = res->ai_addrlen;
2013        freeaddrinfo(res);
2014      }
2015    }
2016  
2017    conf_add_class_to_conf(conf, block_state.class.buf);
2018 <  lookup_confhost(conf);
2018 >  conf_dns_lookup(conf);
2019   };
2020  
2021   connect_items:  connect_items connect_item | connect_item;
2022   connect_item:   connect_name |
2023                  connect_host |
2024 <                connect_vhost |
2024 >                connect_timeout |
2025 >                connect_bind |
2026                  connect_send_password |
2027                  connect_accept_password |
2028 <                connect_ssl_certificate_fingerprint |
2028 >                connect_tls_certificate_fingerprint |
2029                  connect_aftype |
2030                  connect_port |
2031 <                connect_ssl_cipher_list |
2031 >                connect_tls_cipher_list |
2032                  connect_flags |
2033                  connect_hub_mask |
2034                  connect_leaf_mask |
# Line 2170 | Line 2048 | connect_host: HOST '=' QSTRING ';'
2048      strlcpy(block_state.host.buf, yylval.string, sizeof(block_state.host.buf));
2049   };
2050  
2051 < connect_vhost: VHOST '=' QSTRING ';'
2051 > connect_timeout: TIMEOUT '=' timespec ';'
2052 > {
2053 >  if (conf_parser_ctx.pass == 2)
2054 >    block_state.timeout.value = $3;
2055 > };
2056 >
2057 > connect_bind: T_BIND '=' QSTRING ';'
2058   {
2059    if (conf_parser_ctx.pass == 2)
2060      strlcpy(block_state.bind.buf, yylval.string, sizeof(block_state.bind.buf));
# Line 2181 | Line 2065 | connect_send_password: SEND_PASSWORD '='
2065    if (conf_parser_ctx.pass != 2)
2066      break;
2067  
2068 <  if ($3[0] == ':')
2068 >  if (*yylval.string == ':')
2069      conf_error_report("Server passwords cannot begin with a colon");
2070 <  else if (strchr($3, ' '))
2070 >  else if (strchr(yylval.string, ' '))
2071      conf_error_report("Server passwords cannot contain spaces");
2072    else
2073      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
# Line 2194 | Line 2078 | connect_accept_password: ACCEPT_PASSWORD
2078    if (conf_parser_ctx.pass != 2)
2079      break;
2080  
2081 <  if ($3[0] == ':')
2081 >  if (*yylval.string == ':')
2082      conf_error_report("Server passwords cannot begin with a colon");
2083 <  else if (strchr($3, ' '))
2083 >  else if (strchr(yylval.string, ' '))
2084      conf_error_report("Server passwords cannot contain spaces");
2085    else
2086      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2087   };
2088  
2089 < connect_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
2089 > connect_tls_certificate_fingerprint: TLS_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
2090   {
2091    if (conf_parser_ctx.pass == 2)
2092      strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf));
# Line 2227 | Line 2111 | connect_aftype: AFTYPE '=' T_IPV4 ';'
2111   connect_flags: IRCD_FLAGS
2112   {
2113    block_state.flags.value &= CONF_FLAGS_ENCRYPTED;
2114 < } '='  connect_flags_items ';';
2114 > } '=' connect_flags_items ';';
2115  
2116   connect_flags_items: connect_flags_items ',' connect_flags_item | connect_flags_item;
2117   connect_flags_item: AUTOCONN
2118   {
2119    if (conf_parser_ctx.pass == 2)
2120      block_state.flags.value |= CONF_FLAGS_ALLOW_AUTO_CONN;
2121 < } | T_SSL
2121 > } | T_TLS
2122   {
2123    if (conf_parser_ctx.pass == 2)
2124 <    block_state.flags.value |= CONF_FLAGS_SSL;
2124 >    block_state.flags.value |= CONF_FLAGS_TLS;
2125   };
2126  
2127   connect_encrypted: ENCRYPTED '=' TBOOL ';'
# Line 2269 | Line 2153 | connect_class: CLASS '=' QSTRING ';'
2153      strlcpy(block_state.class.buf, yylval.string, sizeof(block_state.class.buf));
2154   };
2155  
2156 < connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
2156 > connect_tls_cipher_list: TLS_CIPHER_LIST '=' QSTRING ';'
2157   {
2158   #ifdef HAVE_TLS
2159    if (conf_parser_ctx.pass == 2)
2160      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2161   #else
2162    if (conf_parser_ctx.pass == 2)
2163 <    conf_error_report("Ignoring connect::ciphers -- no TLS support");
2163 >    conf_error_report("Ignoring connect::tls_cipher_list -- no TLS support");
2164   #endif
2165   };
2166  
# Line 2290 | Line 2174 | kill_entry: KILL
2174      reset_block_state();
2175   } '{' kill_items '}' ';'
2176   {
2293 –  struct MaskItem *conf = NULL;
2294 –
2177    if (conf_parser_ctx.pass != 2)
2178      break;
2179  
# Line 2299 | Line 2181 | kill_entry: KILL
2181        !block_state.host.buf[0])
2182      break;
2183  
2184 <  conf = conf_make(CONF_KLINE);
2184 >  struct MaskItem *conf = conf_make(CONF_KLINE);
2185    conf->user = xstrdup(block_state.user.buf);
2186    conf->host = xstrdup(block_state.host.buf);
2187  
# Line 2349 | Line 2231 | deny_entry: DENY
2231      reset_block_state();
2232   } '{' deny_items '}' ';'
2233   {
2352 –  struct MaskItem *conf = NULL;
2353 –
2234    if (conf_parser_ctx.pass != 2)
2235      break;
2236  
# Line 2359 | Line 2239 | deny_entry: DENY
2239  
2240    if (parse_netmask(block_state.addr.buf, NULL, NULL) != HM_HOST)
2241    {
2242 <    conf = conf_make(CONF_DLINE);
2242 >    struct MaskItem *conf = conf_make(CONF_DLINE);
2243      conf->host = xstrdup(block_state.addr.buf);
2244  
2245      if (block_state.rpass.buf[0])
# Line 2456 | Line 2336 | general_entry: GENERAL '{' general_items
2336   general_items:      general_items general_item | general_item;
2337   general_item:       general_away_count |
2338                      general_away_time |
2459 –                    general_ignore_bogus_ts |
2339                      general_failed_oper_notice |
2340                      general_anti_nick_flood |
2341                      general_max_nick_time |
# Line 2486 | Line 2365 | general_item:       general_away_count |
2365                      general_caller_id_wait |
2366                      general_opers_bypass_callerid |
2367                      general_default_floodcount |
2368 +                    general_default_floodtime |
2369                      general_min_nonwildcard |
2370                      general_min_nonwildcard_simple |
2371                      general_throttle_count |
2372                      general_throttle_time |
2373                      general_ping_cookie |
2374                      general_disable_auth |
2495 –                    general_tkline_expire_notices |
2375                      general_dline_min_cidr |
2376                      general_dline_min_cidr6 |
2377                      general_kline_min_cidr |
# Line 2525 | Line 2404 | general_whowas_history_length: WHOWAS_HI
2404  
2405   general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2406   {
2407 <  if (conf_parser_ctx.pass == 2)
2529 <    ConfigGeneral.cycle_on_host_change = yylval.number;
2407 >  ConfigGeneral.cycle_on_host_change = yylval.number;
2408   };
2409  
2410   general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';'
# Line 2549 | Line 2427 | general_kline_min_cidr6: KLINE_MIN_CIDR6
2427    ConfigGeneral.kline_min_cidr6 = $3;
2428   };
2429  
2552 – general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2553 – {
2554 –  ConfigGeneral.tkline_expire_notices = yylval.number;
2555 – };
2556 –
2430   general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2431   {
2432    ConfigGeneral.kill_chase_time_limit = $3;
2433   };
2434  
2562 – general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';'
2563 – {
2564 –  ConfigGeneral.ignore_bogus_ts = yylval.number;
2565 – };
2566 –
2435   general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';'
2436   {
2437    ConfigGeneral.failed_oper_notice = yylval.number;
# Line 2601 | Line 2469 | general_ts_warn_delta: TS_WARN_DELTA '='
2469  
2470   general_ts_max_delta: TS_MAX_DELTA '=' timespec ';'
2471   {
2472 <  if (conf_parser_ctx.pass == 2)
2605 <    ConfigGeneral.ts_max_delta = $3;
2472 >  ConfigGeneral.ts_max_delta = $3;
2473   };
2474  
2475   general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
# Line 2642 | Line 2509 | general_stats_u_oper_only: STATS_U_OPER_
2509  
2510   general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';'
2511   {
2512 <  ConfigGeneral.stats_k_oper_only = 2 * yylval.number;
2646 < } | STATS_K_OPER_ONLY '=' TMASKED ';'
2647 < {
2648 <  ConfigGeneral.stats_k_oper_only = 1;
2512 >  ConfigGeneral.stats_k_oper_only = yylval.number;
2513   };
2514  
2515   general_stats_i_oper_only: STATS_I_OPER_ONLY '=' TBOOL ';'
2516   {
2517 <  ConfigGeneral.stats_i_oper_only = 2 * yylval.number;
2654 < } | STATS_I_OPER_ONLY '=' TMASKED ';'
2655 < {
2656 <  ConfigGeneral.stats_i_oper_only = 1;
2517 >  ConfigGeneral.stats_i_oper_only = yylval.number;
2518   };
2519  
2520   general_pace_wait: PACE_WAIT '=' timespec ';'
# Line 2719 | Line 2580 | general_throttle_time: THROTTLE_TIME '='
2580   general_oper_umodes: OPER_UMODES
2581   {
2582    ConfigGeneral.oper_umodes = 0;
2583 < } '='  umode_oitems ';' ;
2583 > } '=' umode_oitems ';' ;
2584  
2585   umode_oitems:    umode_oitems ',' umode_oitem | umode_oitem;
2586   umode_oitem:     T_BOTS
# Line 2788 | Line 2649 | umode_oitem:     T_BOTS
2649   } | T_FARCONNECT
2650   {
2651    ConfigGeneral.oper_umodes |= UMODE_FARCONNECT;
2652 + } | EXPIRATION
2653 + {
2654 +  ConfigGeneral.oper_umodes |= UMODE_EXPIRATION;
2655   };
2656  
2657   general_oper_only_umodes: OPER_ONLY_UMODES
2658   {
2659    ConfigGeneral.oper_only_umodes = 0;
2660 < } '='  umode_items ';' ;
2660 > } '=' umode_items ';' ;
2661  
2662   umode_items:  umode_items ',' umode_item | umode_item;
2663   umode_item:   T_BOTS
# Line 2856 | Line 2720 | umode_item:   T_BOTS
2720   } | T_FARCONNECT
2721   {
2722    ConfigGeneral.oper_only_umodes |= UMODE_FARCONNECT;
2723 + } | EXPIRATION
2724 + {
2725 +  ConfigGeneral.oper_only_umodes |= UMODE_EXPIRATION;
2726   };
2727  
2728   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
# Line 2873 | Line 2740 | general_default_floodcount: DEFAULT_FLOO
2740    ConfigGeneral.default_floodcount = $3;
2741   };
2742  
2743 + general_default_floodtime: DEFAULT_FLOODTIME '=' timespec ';'
2744 + {
2745 +  ConfigGeneral.default_floodtime = $3;
2746 + };
2747 +
2748  
2749   /***************************************************************************
2750   * channel {} section
# Line 2881 | Line 2753 | channel_entry: CHANNEL '{' channel_items
2753  
2754   channel_items:      channel_items channel_item | channel_item;
2755   channel_item:       channel_max_bans |
2756 +                    channel_max_bans_large |
2757                      channel_invite_client_count |
2758                      channel_invite_client_time |
2759                      channel_invite_delay_channel |
2760 +                    channel_invite_expire_time |
2761                      channel_knock_client_count |
2762                      channel_knock_client_time |
2763                      channel_knock_delay_channel |
# Line 2892 | Line 2766 | channel_item:       channel_max_bans |
2766                      channel_default_join_flood_count |
2767                      channel_default_join_flood_time |
2768                      channel_disable_fake_channels |
2769 +                    channel_enable_extbans |
2770                      error;
2771  
2772 + channel_enable_extbans: ENABLE_EXTBANS '=' TBOOL ';'
2773 + {
2774 +  ConfigChannel.enable_extbans = yylval.number;
2775 + };
2776 +
2777   channel_disable_fake_channels: DISABLE_FAKE_CHANNELS '=' TBOOL ';'
2778   {
2779    ConfigChannel.disable_fake_channels = yylval.number;
# Line 2914 | Line 2794 | channel_invite_delay_channel: INVITE_DEL
2794    ConfigChannel.invite_delay_channel = $3;
2795   };
2796  
2797 + channel_invite_expire_time: INVITE_EXPIRE_TIME '=' timespec ';'
2798 + {
2799 +  ConfigChannel.invite_expire_time = $3;
2800 + };
2801 +
2802   channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2803   {
2804    ConfigChannel.knock_client_count = $3;
# Line 2944 | Line 2829 | channel_max_bans: MAX_BANS '=' NUMBER ';
2829    ConfigChannel.max_bans = $3;
2830   };
2831  
2832 + channel_max_bans_large: MAX_BANS_LARGE '=' NUMBER ';'
2833 + {
2834 +  ConfigChannel.max_bans_large = $3;
2835 + };
2836 +
2837   channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';'
2838   {
2839    ConfigChannel.default_join_flood_count = yylval.number;

Diff Legend

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