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 7258 by michael, Sat Feb 6 17:29:57 2016 UTC vs.
Revision 7624 by michael, Thu Jun 23 12:44:09 2016 UTC

# Line 34 | Line 34
34   #include "conf.h"
35   #include "conf_class.h"
36   #include "conf_cluster.h"
37 + #include "conf_gecos.h"
38   #include "conf_pseudo.h"
39   #include "conf_resv.h"
40   #include "conf_service.h"
# Line 98 | Line 99 | static struct
99      max_total,
100      max_global,
101      max_local,
101    max_ident,
102      max_sendq,
103      max_recvq,
104      max_channels,
# Line 226 | Line 226 | reset_block_state(void)
226   %token  MAX_BANS
227   %token  MAX_CHANNELS
228   %token  MAX_GLOBAL
229 %token  MAX_IDENT
229   %token  MAX_IDLE
230   %token  MAX_LOCAL
231   %token  MAX_NICK_CHANGES
# Line 364 | Line 363 | reset_block_state(void)
363   %token  VHOST6
364   %token  WARN_NO_CONNECT_BLOCK
365   %token  WHOIS
366 + %token  WHOWAS_HISTORY_LENGTH
367   %token  XLINE
368   %token  XLINE_EXEMPT
369  
# Line 1045 | Line 1045 | oper_entry: OPERATOR
1045    {
1046      struct MaskItem *conf = NULL;
1047      struct split_nuh_item nuh;
1048 +    char *s = node->data;
1049  
1050 <    nuh.nuhmask  = node->data;
1050 >    if (EmptyString(s))
1051 >      continue;
1052 >
1053 >    nuh.nuhmask  = s;
1054      nuh.nickptr  = NULL;
1055      nuh.userptr  = block_state.user.buf;
1056      nuh.hostptr  = block_state.host.buf;
# Line 1409 | Line 1413 | class_entry: CLASS
1413    class->max_total = block_state.max_total.value;
1414    class->max_global = block_state.max_global.value;
1415    class->max_local = block_state.max_local.value;
1412  class->max_ident = block_state.max_ident.value;
1416    class->max_sendq = block_state.max_sendq.value;
1417    class->max_recvq = block_state.max_recvq.value;
1418    class->max_channels = block_state.max_channels.value;
# Line 1444 | Line 1447 | class_item:     class_name |
1447                  class_max_number |
1448                  class_max_global |
1449                  class_max_local |
1450 <                class_max_ident |
1451 <                class_sendq | class_recvq |
1450 >                class_sendq |
1451 >                class_recvq |
1452                  class_min_idle |
1453                  class_max_idle |
1454                  class_flags |
# Line 1499 | Line 1502 | class_max_local: MAX_LOCAL '=' NUMBER ';
1502      block_state.max_local.value = $3;
1503   };
1504  
1502 class_max_ident: MAX_IDENT '=' NUMBER ';'
1503 {
1504  if (conf_parser_ctx.pass == 1)
1505    block_state.max_ident.value = $3;
1506 };
1507
1505   class_sendq: SENDQ '=' sizespec ';'
1506   {
1507    if (conf_parser_ctx.pass == 1)
# Line 1669 | Line 1666 | auth_entry: IRCD_AUTH
1666    {
1667      struct MaskItem *conf = NULL;
1668      struct split_nuh_item nuh;
1669 +    char *s = node->data;
1670 +
1671 +    if (EmptyString(s))
1672 +      continue;
1673  
1674 <    nuh.nuhmask  = node->data;
1674 >    nuh.nuhmask  = s;
1675      nuh.nickptr  = NULL;
1676      nuh.userptr  = block_state.user.buf;
1677      nuh.hostptr  = block_state.host.buf;
# Line 1833 | Line 1834 | resv_entry: RESV
1834    if (conf_parser_ctx.pass != 2)
1835      break;
1836  
1837 <  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1837 >  resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1838   };
1839  
1840   resv_items:     resv_items resv_item | resv_item;
# Line 2415 | Line 2416 | gecos_entry: GECOS
2416      reset_block_state();
2417   } '{' gecos_items '}' ';'
2418   {
2418  struct MaskItem *conf = NULL;
2419
2419    if (conf_parser_ctx.pass != 2)
2420      break;
2421  
2422    if (!block_state.name.buf[0])
2423      break;
2424  
2425 <  conf = conf_make(CONF_XLINE);
2426 <  conf->name = xstrdup(block_state.name.buf);
2425 >  struct GecosItem *gecos = gecos_make();
2426 >  gecos->mask = xstrdup(block_state.name.buf);
2427  
2428    if (block_state.rpass.buf[0])
2429 <    conf->reason = xstrdup(block_state.rpass.buf);
2429 >    gecos->reason = xstrdup(block_state.rpass.buf);
2430    else
2431 <    conf->reason = xstrdup(CONF_NOREASON);
2431 >    gecos->reason = xstrdup(CONF_NOREASON);
2432   };
2433  
2434   gecos_items: gecos_items gecos_item | gecos_item;
# Line 2462 | Line 2461 | general_item:       general_away_count |
2461                      general_max_nick_time |
2462                      general_max_nick_changes |
2463                      general_max_accept |
2464 +                    general_whowas_history_length |
2465                      general_anti_spam_exit_message_time |
2466                      general_ts_warn_delta |
2467                      general_ts_max_delta |
# Line 2517 | Line 2517 | general_max_watch: MAX_WATCH '=' NUMBER
2517    ConfigGeneral.max_watch = $3;
2518   };
2519  
2520 + general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';'
2521 + {
2522 +  ConfigGeneral.whowas_history_length = $3;
2523 + };
2524 +
2525   general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2526   {
2527    if (conf_parser_ctx.pass == 2)

Diff Legend

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