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 1736 by michael, Sun Jan 13 09:31:46 2013 UTC vs.
Revision 1911 by michael, Sun Apr 28 10:34:57 2013 UTC

# Line 38 | Line 38
38   #include "log.h"
39   #include "client.h"     /* for UMODE_ALL only */
40   #include "irc_string.h"
41 #include "sprintf_irc.h"
41   #include "memory.h"
42   #include "modules.h"
43   #include "s_serv.h"
# Line 56 | Line 55
55   #include <openssl/dh.h>
56   #endif
57  
58 + #include "rsa.h"
59 +
60   int yylex(void);
61  
62   static struct
# Line 90 | Line 91 | static struct
91      ping_freq,
92      max_perip,
93      con_freq,
94 +    min_idle,
95 +    max_idle,
96      max_total,
97      max_global,
98      max_local,
# Line 187 | Line 190 | reset_block_state(void)
190   %token  HIDDEN_NAME
191   %token  HIDE_SERVER_IPS
192   %token  HIDE_SERVERS
193 + %token  HIDE_SERVICES
194   %token  HIDE_SPOOF_IPS
195   %token  HOST
196   %token  HUB
# Line 204 | Line 208 | reset_block_state(void)
208   %token  LINKS_DELAY
209   %token  LISTEN
210   %token  T_LOG
211 + %token  MASK
212   %token  MAX_ACCEPT
213   %token  MAX_BANS
214   %token  MAX_CHANS_PER_OPER
# Line 212 | Line 217 | reset_block_state(void)
217   %token  MAX_IDENT
218   %token  MAX_LOCAL
219   %token  MAX_NICK_CHANGES
220 + %token  MAX_NICK_LENGTH
221   %token  MAX_NICK_TIME
222   %token  MAX_NUMBER
223   %token  MAX_TARGETS
224 + %token  MAX_TOPIC_LENGTH
225   %token  MAX_WATCH
219 %token  MESSAGE_LOCALE
226   %token  MIN_NONWILDCARD
227   %token  MIN_NONWILDCARD_SIMPLE
228 + %token  MIN_IDLE
229 + %token  MAX_IDLE
230 + %token  RANDOM_IDLE
231 + %token  HIDE_IDLE_FROM_OPERS
232   %token  MODULE
233   %token  MODULES
234   %token  NAME
# Line 226 | Line 236 | reset_block_state(void)
236   %token  NETWORK_DESC
237   %token  NETWORK_NAME
238   %token  NICK
229 %token  NICK_CHANGES
239   %token  NO_CREATE_ON_SPLIT
240   %token  NO_JOIN_ON_SPLIT
241   %token  NO_OPER_FLOOD
# Line 258 | Line 267 | reset_block_state(void)
267   %token  REHASH
268   %token  REMOTE
269   %token  REMOTEBAN
261 %token  RESTRICT_CHANNELS
270   %token  RSA_PRIVATE_KEY_FILE
271   %token  RSA_PUBLIC_KEY_FILE
272   %token  SSL_CERTIFICATE_FILE
# Line 269 | Line 277 | reset_block_state(void)
277   %token  T_TLSV1
278   %token  RESV
279   %token  RESV_EXEMPT
280 < %token  SECONDS MINUTES HOURS DAYS WEEKS
280 > %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS
281   %token  SENDQ
282   %token  SEND_PASSWORD
283   %token  SERVERHIDE
# Line 310 | Line 318 | reset_block_state(void)
318   %token  T_LOCOPS
319   %token  T_MAX_CLIENTS
320   %token  T_NCHANGE
321 + %token  T_NONONREG
322   %token  T_OPERWALL
323   %token  T_RECVQ
324   %token  T_REJ
# Line 406 | Line 415 | timespec:      NUMBER timespec_
415                  {
416                          $$ = $1 * 60 * 60 * 24 * 7 + $3;
417                  }
418 +                | NUMBER MONTHS timespec_
419 +                {
420 +                        $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3;
421 +                }
422 +                | NUMBER YEARS timespec_
423 +                {
424 +                        $$ = $1 * 60 * 60 * 24 * 365 + $3;
425 +                }
426                  ;
427  
428   sizespec_:      { $$ = 0; } | sizespec;
# Line 444 | Line 461 | serverinfo_items:       serverinfo_items
461   serverinfo_item:        serverinfo_name | serverinfo_vhost |
462                          serverinfo_hub | serverinfo_description |
463                          serverinfo_network_name | serverinfo_network_desc |
464 <                        serverinfo_max_clients | serverinfo_ssl_dh_param_file |
464 >                        serverinfo_max_clients | serverinfo_max_nick_length |
465 >                        serverinfo_max_topic_length | serverinfo_ssl_dh_param_file |
466                          serverinfo_rsa_private_key_file | serverinfo_vhost6 |
467                          serverinfo_sid | serverinfo_ssl_certificate_file |
468                          serverinfo_ssl_client_method | serverinfo_ssl_server_method |
# Line 492 | Line 510 | serverinfo_ssl_certificate_file: SSL_CER
510    {
511      if (!ServerInfo.rsa_private_key_file)
512      {
513 <      yyerror("No rsa_private_key_file specified, SSL disabled");
513 >      conf_error_report("No rsa_private_key_file specified, SSL disabled");
514        break;
515      }
516  
# Line 501 | Line 519 | serverinfo_ssl_certificate_file: SSL_CER
519          SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string,
520                                       SSL_FILETYPE_PEM) <= 0)
521      {
522 <      yyerror(ERR_lib_error_string(ERR_get_error()));
522 >      report_crypto_errors();
523 >      conf_error_report("Could not open/read certificate file");
524        break;
525      }
526  
# Line 510 | Line 529 | serverinfo_ssl_certificate_file: SSL_CER
529          SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file,
530                                      SSL_FILETYPE_PEM) <= 0)
531      {
532 <      yyerror(ERR_lib_error_string(ERR_get_error()));
532 >      report_crypto_errors();
533 >      conf_error_report("Could not read RSA private key");
534        break;
535      }
536  
537      if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) ||
538          !SSL_CTX_check_private_key(ServerInfo.client_ctx))
539      {
540 <      yyerror(ERR_lib_error_string(ERR_get_error()));
540 >      report_crypto_errors();
541 >      conf_error_report("Could not read RSA private key");
542        break;
543      }
544    }
# Line 547 | Line 568 | serverinfo_rsa_private_key_file: RSA_PRI
568  
569      if ((file = BIO_new_file(yylval.string, "r")) == NULL)
570      {
571 <      yyerror("File open failed, ignoring");
571 >      conf_error_report("File open failed, ignoring");
572        break;
573      }
574  
# Line 558 | Line 579 | serverinfo_rsa_private_key_file: RSA_PRI
579  
580      if (ServerInfo.rsa_private_key == NULL)
581      {
582 <      yyerror("Couldn't extract key, ignoring");
582 >      conf_error_report("Couldn't extract key, ignoring");
583        break;
584      }
585  
# Line 567 | Line 588 | serverinfo_rsa_private_key_file: RSA_PRI
588        RSA_free(ServerInfo.rsa_private_key);
589        ServerInfo.rsa_private_key = NULL;
590  
591 <      yyerror("Invalid key, ignoring");
591 >      conf_error_report("Invalid key, ignoring");
592        break;
593      }
594  
# Line 577 | Line 598 | serverinfo_rsa_private_key_file: RSA_PRI
598        RSA_free(ServerInfo.rsa_private_key);
599        ServerInfo.rsa_private_key = NULL;
600  
601 <      yyerror("Not a 2048 bit key, ignoring");
601 >      conf_error_report("Not a 2048 bit key, ignoring");
602      }
603    }
604   #endif
# Line 600 | Line 621 | serverinfo_ssl_dh_param_file: SSL_DH_PAR
621        if (dh)
622        {
623          if (DH_size(dh) < 128)
624 <          ilog(LOG_TYPE_IRCD, "Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
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  
# Line 628 | Line 649 | serverinfo_name: NAME '=' QSTRING ';'
649        ServerInfo.name = xstrdup(yylval.string);
650      else
651      {
652 <      ilog(LOG_TYPE_IRCD, "Ignoring serverinfo::name -- invalid name. Aborting.");
652 >      conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
653        exit(0);
654      }
655    }
# Line 643 | Line 664 | serverinfo_sid: IRCD_SID '=' QSTRING ';'
664        ServerInfo.sid = xstrdup(yylval.string);
665      else
666      {
667 <      ilog(LOG_TYPE_IRCD, "Ignoring serverinfo::sid -- invalid SID. Aborting.");
667 >      conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
668        exit(0);
669      }
670    }
# Line 749 | Line 770 | serverinfo_max_clients: T_MAX_CLIENTS '=
770      char buf[IRCD_BUFSIZE];
771  
772      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
773 <    yyerror(buf);
773 >    conf_error_report(buf);
774      ServerInfo.max_clients = MAXCLIENTS_MIN;
775    }
776    else if ($3 > MAXCLIENTS_MAX)
# Line 757 | Line 778 | serverinfo_max_clients: T_MAX_CLIENTS '=
778      char buf[IRCD_BUFSIZE];
779  
780      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
781 <    yyerror(buf);
781 >    conf_error_report(buf);
782      ServerInfo.max_clients = MAXCLIENTS_MAX;
783    }
784    else
785      ServerInfo.max_clients = $3;
786   };
787  
788 + serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';'
789 + {
790 +  if (conf_parser_ctx.pass != 2)
791 +    break;
792 +
793 +  if ($3 < 9)
794 +  {
795 +    conf_error_report("max_nick_length too low, setting to 9");
796 +    ServerInfo.max_nick_length = 9;
797 +  }
798 +  else if ($3 > NICKLEN)
799 +  {
800 +    char buf[IRCD_BUFSIZE];
801 +
802 +    snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
803 +    conf_error_report(buf);
804 +    ServerInfo.max_nick_length = NICKLEN;
805 +  }
806 +  else
807 +    ServerInfo.max_nick_length = $3;
808 + };
809 +
810 + serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';'
811 + {
812 +  if (conf_parser_ctx.pass != 2)
813 +    break;
814 +
815 +  if ($3 < 80)
816 +  {
817 +    conf_error_report("max_topic_length too low, setting to 80");
818 +    ServerInfo.max_topic_length = 80;
819 +  }
820 +  else if ($3 > TOPICLEN)
821 +  {
822 +    char buf[IRCD_BUFSIZE];
823 +
824 +    snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
825 +    conf_error_report(buf);
826 +    ServerInfo.max_topic_length = TOPICLEN;
827 +  }
828 +  else
829 +    ServerInfo.max_topic_length = $3;
830 + };
831 +
832   serverinfo_hub: HUB '=' TBOOL ';'
833   {
834    if (conf_parser_ctx.pass == 2)
# Line 831 | Line 896 | logging_file_entry:
896      break;
897  
898    if (block_state.type.value && block_state.file.buf[0])
899 <    log_add_file(block_state.type.value, block_state.size.value,
899 >    log_set_file(block_state.type.value, block_state.size.value,
900                   block_state.file.buf);
901   };
902  
# Line 960 | Line 1025 | oper_entry: OPERATOR
1025  
1026        if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1027        {
1028 <        yyerror("Ignoring rsa_public_key_file -- file doesn't exist");
1028 >        conf_error_report("Ignoring rsa_public_key_file -- file doesn't exist");
1029          break;
1030        }
1031  
1032        if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1033 <      {
969 <        yyerror("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
970 <        break;
971 <      }
1033 >        conf_error_report("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
1034  
1035        conf->rsa_public_key = pkey;
1036        BIO_set_close(file, BIO_CLOSE);
# Line 1111 | Line 1173 | oper_umodes_item:  T_BOTS
1173   {
1174    if (conf_parser_ctx.pass == 2)
1175      block_state.modes.value |= UMODE_LOCOPS;
1176 + } | T_NONONREG
1177 + {
1178 +  if (conf_parser_ctx.pass == 2)
1179 +    block_state.modes.value |= UMODE_REGONLY;
1180   };
1181  
1182   oper_flags: IRCD_FLAGS
# Line 1168 | Line 1234 | oper_flags_item: GLOBAL_KILL
1234   {
1235    if (conf_parser_ctx.pass == 2)
1236      block_state.port.value |= OPER_FLAG_ADMIN;
1171 } | NICK_CHANGES
1172 {
1173  if (conf_parser_ctx.pass == 2)
1174    block_state.port.value |= OPER_FLAG_N;
1237   } | T_OPERWALL
1238   {
1239    if (conf_parser_ctx.pass == 2)
# Line 1214 | Line 1276 | class_entry: CLASS
1276    block_state.max_total.value = MAXIMUM_LINKS_DEFAULT;
1277    block_state.max_sendq.value = DEFAULT_SENDQ;
1278    block_state.max_recvq.value = DEFAULT_RECVQ;
1217
1279   } '{' class_items '}' ';'
1280   {
1281    struct ClassItem *class = NULL;
# Line 1241 | Line 1302 | class_entry: CLASS
1302    class->max_sendq = block_state.max_sendq.value;
1303    class->max_recvq = block_state.max_recvq.value;
1304  
1305 +  if (block_state.min_idle.value > block_state.max_idle.value)
1306 +  {
1307 +    block_state.min_idle.value = 0;
1308 +    block_state.max_idle.value = 0;
1309 +    block_state.flags.value &= ~CLASS_FLAGS_FAKE_IDLE;
1310 +  }
1311 +
1312 +  class->flags = block_state.flags.value;
1313 +  class->min_idle = block_state.min_idle.value;
1314 +  class->max_idle = block_state.max_idle.value;
1315 +
1316    if (class->number_per_cidr && block_state.number_per_cidr.value)
1317      if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1318          (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
# Line 1265 | Line 1337 | class_item:     class_name |
1337                  class_max_local |
1338                  class_max_ident |
1339                  class_sendq | class_recvq |
1340 +                class_min_idle |
1341 +                class_max_idle |
1342 +                class_flags |
1343                  error ';' ;
1344  
1345   class_name: NAME '=' QSTRING ';'
# Line 1346 | Line 1421 | class_number_per_cidr: NUMBER_PER_CIDR '
1421      block_state.number_per_cidr.value = $3;
1422   };
1423  
1424 + class_min_idle: MIN_IDLE '=' timespec ';'
1425 + {
1426 +  if (conf_parser_ctx.pass != 1)
1427 +    break;
1428 +
1429 +  block_state.min_idle.value = $3;
1430 +  block_state.flags.value |= CLASS_FLAGS_FAKE_IDLE;
1431 + };
1432 +
1433 + class_max_idle: MAX_IDLE '=' timespec ';'
1434 + {
1435 +  if (conf_parser_ctx.pass != 1)
1436 +    break;
1437 +
1438 +  block_state.max_idle.value = $3;
1439 +  block_state.flags.value |= CLASS_FLAGS_FAKE_IDLE;
1440 + };
1441 +
1442 + class_flags: IRCD_FLAGS
1443 + {
1444 +  if (conf_parser_ctx.pass == 1)
1445 +    block_state.flags.value &= CLASS_FLAGS_FAKE_IDLE;
1446 + } '='  class_flags_items ';';
1447 +
1448 + class_flags_items: class_flags_items ',' class_flags_item | class_flags_item;
1449 + class_flags_item: RANDOM_IDLE
1450 + {
1451 +  if (conf_parser_ctx.pass == 1)
1452 +    block_state.flags.value |= CLASS_FLAGS_RANDOM_IDLE;
1453 + } | HIDE_IDLE_FROM_OPERS
1454 + {
1455 +  if (conf_parser_ctx.pass == 1)
1456 +    block_state.flags.value |= CLASS_FLAGS_HIDE_IDLE_FROM_OPERS;
1457 + };
1458 +
1459 +
1460   /***************************************************************************
1461   *  section listen
1462   ***************************************************************************/
# Line 1391 | Line 1502 | port_item: NUMBER
1502        if (!ServerInfo.server_ctx)
1503   #endif
1504        {
1505 <        yyerror("SSL not available - port closed");
1505 >        conf_error_report("SSL not available - port closed");
1506          break;
1507        }
1508      add_listener($1, block_state.addr.buf, block_state.flags.value);
# Line 1407 | Line 1518 | port_item: NUMBER
1518        if (!ServerInfo.server_ctx)
1519   #endif
1520        {
1521 <        yyerror("SSL not available - port closed");
1521 >        conf_error_report("SSL not available - port closed");
1522          break;
1523        }
1524  
# Line 1463 | Line 1574 | auth_entry: IRCD_AUTH
1574      if (block_state.rpass.buf[0])
1575        conf->passwd = xstrdup(block_state.rpass.buf);
1576      if (block_state.name.buf[0])
1577 <      conf->passwd = xstrdup(block_state.name.buf);
1577 >      conf->name = xstrdup(block_state.name.buf);
1578  
1579      conf->flags = block_state.flags.value;
1580      conf->port  = block_state.port.value;
# Line 1599 | Line 1710 | resv_entry: RESV
1710  
1711    reset_block_state();
1712    strlcpy(block_state.rpass.buf, CONF_NOREASON, sizeof(block_state.rpass.buf));
1713 < } '{' resv_items '}' ';';
1713 > } '{' resv_items '}' ';'
1714 > {
1715 >  if (conf_parser_ctx.pass != 2)
1716 >    break;
1717 >
1718 >  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1719 > };
1720  
1721   resv_items:     resv_items resv_item | resv_item;
1722 < resv_item:      resv_creason | resv_channel | resv_nick | error ';' ;
1722 > resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1723  
1724 < resv_creason: REASON '=' QSTRING ';'
1724 > resv_mask: MASK '=' QSTRING ';'
1725   {
1726    if (conf_parser_ctx.pass == 2)
1727 <    strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1727 >    strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
1728   };
1729  
1730 < resv_channel: CHANNEL '=' QSTRING ';'
1730 > resv_reason: REASON '=' QSTRING ';'
1731   {
1732 <  if (conf_parser_ctx.pass != 2)
1733 <    break;
1617 <
1618 <  if (IsChanPrefix(*yylval.string))
1619 <    create_channel_resv(yylval.string, block_state.rpass.buf, 1);
1732 >  if (conf_parser_ctx.pass == 2)
1733 >    strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1734   };
1735  
1736 < resv_nick: NICK '=' QSTRING ';'
1736 > resv_exempt: EXEMPT '=' QSTRING ';'
1737   {
1738    if (conf_parser_ctx.pass == 2)
1739 <    create_nick_resv(yylval.string, block_state.rpass.buf, 1);
1739 >    dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list);
1740   };
1741  
1742 +
1743   /***************************************************************************
1744   *  section service
1745   ***************************************************************************/
# Line 1670 | Line 1785 | shared_entry: T_SHARED
1785    conf->flags = block_state.flags.value;
1786    conf->name = xstrdup(block_state.name.buf);
1787    conf->user = xstrdup(block_state.user.buf);
1788 <  conf->user = xstrdup(block_state.host.buf);
1788 >  conf->host = xstrdup(block_state.host.buf);
1789   };
1790  
1791   shared_items: shared_items shared_item | shared_item;
# Line 1933 | Line 2048 | connect_send_password: SEND_PASSWORD '='
2048      break;
2049  
2050    if ($3[0] == ':')
2051 <    yyerror("Server passwords cannot begin with a colon");
2051 >    conf_error_report("Server passwords cannot begin with a colon");
2052    else if (strchr($3, ' ') != NULL)
2053 <    yyerror("Server passwords cannot contain spaces");
2053 >    conf_error_report("Server passwords cannot contain spaces");
2054    else
2055      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
2056   };
# Line 1946 | Line 2061 | connect_accept_password: ACCEPT_PASSWORD
2061      break;
2062  
2063    if ($3[0] == ':')
2064 <    yyerror("Server passwords cannot begin with a colon");
2064 >    conf_error_report("Server passwords cannot begin with a colon");
2065    else if (strchr($3, ' ') != NULL)
2066 <    yyerror("Server passwords cannot contain spaces");
2066 >    conf_error_report("Server passwords cannot contain spaces");
2067    else
2068      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2069   };
# Line 2023 | Line 2138 | connect_ssl_cipher_list: T_SSL_CIPHER_LI
2138      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2139   #else
2140    if (conf_parser_ctx.pass == 2)
2141 <    yyerror("Ignoring connect::ciphers -- no OpenSSL support");
2141 >    conf_error_report("Ignoring connect::ciphers -- no OpenSSL support");
2142   #endif
2143   };
2144  
# Line 2235 | Line 2350 | gecos_entry: GECOS
2350      conf = conf_make(CONF_RXLINE);
2351      conf->regexuser = exp_p;
2352   #else
2353 <    ilog(LOG_TYPE_IRCD, "Failed to add regular expression based X-Line: no PCRE support");
2353 >    conf_error_report("Failed to add regular expression based X-Line: no PCRE support");
2354      break;
2355   #endif
2356    }
# Line 2298 | Line 2413 | general_item:       general_hide_spoof_i
2413                      general_pace_wait_simple | general_stats_P_oper_only |
2414                      general_short_motd | general_no_oper_flood |
2415                      general_true_no_oper_flood | general_oper_pass_resv |
2301                    general_message_locale |
2416                      general_oper_only_umodes | general_max_targets |
2417                      general_use_egd | general_egdpool_path |
2418                      general_oper_umodes | general_caller_id_wait |
# Line 2508 | Line 2622 | general_oper_pass_resv: OPER_PASS_RESV '
2622    ConfigFileEntry.oper_pass_resv = yylval.number;
2623   };
2624  
2511 general_message_locale: MESSAGE_LOCALE '=' QSTRING ';'
2512 {
2513  if (conf_parser_ctx.pass == 2)
2514  {
2515    if (strlen(yylval.string) > LOCALE_LENGTH-2)
2516      yylval.string[LOCALE_LENGTH-1] = '\0';
2517
2518    set_locale(yylval.string);
2519  }
2520 };
2521
2625   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2626   {
2627    ConfigFileEntry.dots_in_ident = $3;
# Line 2701 | Line 2804 | umode_item:    T_BOTS
2804   } | T_LOCOPS
2805   {
2806    ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS;
2807 + } | T_NONONREG
2808 + {
2809 +  ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
2810   };
2811  
2812   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
# Line 2731 | Line 2837 | channel_item:       channel_max_bans |
2837                      channel_max_chans_per_user | channel_max_chans_per_oper |
2838                      channel_quiet_on_ban | channel_default_split_user_count |
2839                      channel_default_split_server_count |
2840 <                    channel_no_create_on_split | channel_restrict_channels |
2840 >                    channel_no_create_on_split |
2841                      channel_no_join_on_split |
2842                      channel_jflood_count | channel_jflood_time |
2843                      channel_disable_fake_channels | error;
# Line 2741 | Line 2847 | channel_disable_fake_channels: DISABLE_F
2847    ConfigChannel.disable_fake_channels = yylval.number;
2848   };
2849  
2744 channel_restrict_channels: RESTRICT_CHANNELS '=' TBOOL ';'
2745 {
2746  ConfigChannel.restrict_channels = yylval.number;
2747 };
2748
2850   channel_knock_delay: KNOCK_DELAY '=' timespec ';'
2851   {
2852    ConfigChannel.knock_delay = $3;
# Line 2814 | Line 2915 | serverhide_entry: SERVERHIDE
2915  
2916   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
2917   serverhide_item:    serverhide_flatten_links | serverhide_hide_servers |
2918 +                    serverhide_hide_services |
2919                      serverhide_links_delay |
2920                      serverhide_hidden | serverhide_hidden_name |
2921                      serverhide_hide_server_ips |
# Line 2831 | Line 2933 | serverhide_hide_servers: HIDE_SERVERS '=
2933      ConfigServerHide.hide_servers = yylval.number;
2934   };
2935  
2936 + serverhide_hide_services: HIDE_SERVICES '=' TBOOL ';'
2937 + {
2938 +  if (conf_parser_ctx.pass == 2)
2939 +    ConfigServerHide.hide_services = yylval.number;
2940 + };
2941 +
2942   serverhide_hidden_name: HIDDEN_NAME '=' QSTRING ';'
2943   {
2944    if (conf_parser_ctx.pass == 2)

Diff Legend

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