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

Comparing ircd-hybrid/trunk/src/conf_parser.y (file contents):
Revision 2336 by michael, Wed Jul 3 12:58:28 2013 UTC vs.
Revision 8752 by michael, Tue Jan 1 11:07:01 2019 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  conf_parser.y: Parses the ircd configuration file.
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 2005 by the past and present ircd coders, and others.
4 > *  Copyright (c) 2000-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 16 | Line 15
15   *
16   *  You should have received a copy of the GNU General Public License
17   *  along with this program; if not, write to the Free Software
18 < *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
18 > *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19   *  USA
21 *
22 *  $Id$
20   */
21  
22 < %{
22 > /*! \file conf_parser.y
23 > * \brief Parses the ircd configuration file.
24 > * \version $Id$
25 > */
26  
27 < #define YY_NO_UNPUT
28 < #include <sys/types.h>
29 < #include <string.h>
27 >
28 > %{
29  
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"
39 #include "client.h"     /* for UMODE_ALL only */
46   #include "irc_string.h"
47   #include "memory.h"
48   #include "modules.h"
49 < #include "s_serv.h"
49 > #include "server.h"
50   #include "hostmask.h"
45 #include "send.h"
51   #include "listener.h"
52 < #include "resv.h"
48 < #include "numeric.h"
49 < #include "s_user.h"
52 > #include "user.h"
53   #include "motd.h"
54  
52 #ifdef HAVE_LIBCRYPTO
53 #include <openssl/rsa.h>
54 #include <openssl/bio.h>
55 #include <openssl/pem.h>
56 #include <openssl/dh.h>
57 #endif
58
59 #include "rsa.h"
60
55   int yylex(void);
56  
57   static struct
58   {
59 <  struct {
59 >  struct
60 >  {
61      dlink_list list;
62    } mask,
63      leaf,
64      hub;
65  
66 <  struct {
66 >  struct
67 >  {
68      char buf[IRCD_BUFSIZE];
69    } name,
70 +    nick,
71      user,
72      host,
73      addr,
# Line 80 | 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 {
86 >  struct
87 >  {
88      unsigned int value;
89    } flags,
90      modes,
# Line 91 | 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,
99    max_global,
100    max_local,
101    max_ident,
102      max_sendq,
103      max_recvq,
104 +    max_channels,
105      cidr_bitlen_ipv4,
106      cidr_bitlen_ipv6,
107      number_per_cidr;
# Line 109 | 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 148 | 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 155 | 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
171 %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
180 %token  GLINE
181 %token  GLINE_DURATION
182 %token  GLINE_ENABLE
183 %token  GLINE_EXEMPT
184 %token  GLINE_MIN_CIDR
185 %token  GLINE_MIN_CIDR6
186 %token  GLINE_REQUEST_DURATION
187 %token  GLOBAL_KILL
188 %token  HAVENT_READ_CONF
189   %token  HIDDEN
190   %token  HIDDEN_NAME
191 + %token  HIDE_CHANS
192 + %token  HIDE_IDLE
193   %token  HIDE_IDLE_FROM_OPERS
194   %token  HIDE_SERVER_IPS
195   %token  HIDE_SERVERS
196   %token  HIDE_SERVICES
195 %token  HIDE_SPOOF_IPS
197   %token  HOST
198   %token  HUB
199   %token  HUB_MASK
200   %token  IGNORE_BOGUS_TS
201   %token  INVISIBLE_ON_CONNECT
202 + %token  INVITE_CLIENT_COUNT
203 + %token  INVITE_CLIENT_TIME
204 + %token  INVITE_DELAY_CHANNEL
205 + %token  INVITE_EXPIRE_TIME
206   %token  IP
207   %token  IRCD_AUTH
208   %token  IRCD_FLAGS
209   %token  IRCD_SID
210 < %token  JOIN_FLOOD_COUNT
206 < %token  JOIN_FLOOD_TIME
210 > %token  JOIN
211   %token  KILL
212   %token  KILL_CHASE_TIME_LIMIT
213   %token  KLINE
214   %token  KLINE_EXEMPT
215 < %token  KNOCK_DELAY
215 > %token  KLINE_MIN_CIDR
216 > %token  KLINE_MIN_CIDR6
217 > %token  KNOCK_CLIENT_COUNT
218 > %token  KNOCK_CLIENT_TIME
219   %token  KNOCK_DELAY_CHANNEL
220   %token  LEAF_MASK
214 %token  LINKS_DELAY
221   %token  LISTEN
222   %token  MASK
223   %token  MAX_ACCEPT
224   %token  MAX_BANS
225 < %token  MAX_CHANS_PER_OPER
226 < %token  MAX_CHANS_PER_USER
221 < %token  MAX_GLOBAL
222 < %token  MAX_IDENT
225 > %token  MAX_BANS_LARGE
226 > %token  MAX_CHANNELS
227   %token  MAX_IDLE
228 < %token  MAX_LOCAL
228 > %token  MAX_INVITES
229   %token  MAX_NICK_CHANGES
230   %token  MAX_NICK_LENGTH
231   %token  MAX_NICK_TIME
# Line 241 | Line 245 | reset_block_state(void)
245   %token  NETWORK_DESC
246   %token  NETWORK_NAME
247   %token  NICK
244 %token  NO_CREATE_ON_SPLIT
245 %token  NO_JOIN_ON_SPLIT
248   %token  NO_OPER_FLOOD
249   %token  NO_TILDE
250   %token  NUMBER
251   %token  NUMBER_PER_CIDR
252 < %token  NUMBER_PER_IP
252 > %token  NUMBER_PER_IP_GLOBAL
253 > %token  NUMBER_PER_IP_LOCAL
254   %token  OPER_ONLY_UMODES
252 %token  OPER_PASS_RESV
255   %token  OPER_UMODES
256   %token  OPERATOR
257   %token  OPERS_BYPASS_CALLERID
# Line 271 | Line 273 | reset_block_state(void)
273   %token  RESV
274   %token  RESV_EXEMPT
275   %token  RSA_PRIVATE_KEY_FILE
274 %token  RSA_PUBLIC_KEY_FILE
276   %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS
277   %token  SEND_PASSWORD
278   %token  SENDQ
# Line 284 | Line 285 | reset_block_state(void)
285   %token  SSL_CERTIFICATE_FILE
286   %token  SSL_CERTIFICATE_FINGERPRINT
287   %token  SSL_CONNECTION_REQUIRED
288 + %token  SSL_DH_ELLIPTIC_CURVE
289   %token  SSL_DH_PARAM_FILE
290 + %token  SSL_MESSAGE_DIGEST_ALGORITHM
291   %token  STATS_E_DISABLED
292   %token  STATS_I_OPER_ONLY
293   %token  STATS_K_OPER_ONLY
294 + %token  STATS_M_OPER_ONLY
295   %token  STATS_O_OPER_ONLY
296   %token  STATS_P_OPER_ONLY
297   %token  STATS_U_OPER_ONLY
# Line 295 | Line 299 | reset_block_state(void)
299   %token  T_BOTS
300   %token  T_CALLERID
301   %token  T_CCONN
302 + %token  T_COMMAND
303   %token  T_CLUSTER
304   %token  T_DEAF
305   %token  T_DEBUG
# Line 309 | Line 314 | reset_block_state(void)
314   %token  T_IPV6
315   %token  T_LOCOPS
316   %token  T_LOG
312 %token  T_MAX_CLIENTS
317   %token  T_NCHANGE
318   %token  T_NONONREG
319 < %token  T_OPERWALL
319 > %token  T_OPME
320 > %token  T_PREPEND
321 > %token  T_PSEUDO
322   %token  T_RECVQ
323   %token  T_REJ
324   %token  T_RESTART
325   %token  T_SERVER
326   %token  T_SERVICE
321 %token  T_SERVICES_NAME
327   %token  T_SERVNOTICE
328   %token  T_SET
329   %token  T_SHARED
# Line 328 | Line 333 | reset_block_state(void)
333   %token  T_SPY
334   %token  T_SSL
335   %token  T_SSL_CIPHER_LIST
336 < %token  T_SSL_CLIENT_METHOD
332 < %token  T_SSL_SERVER_METHOD
333 < %token  T_SSLV3
334 < %token  T_TLSV1
336 > %token  T_TARGET
337   %token  T_UMODES
338   %token  T_UNAUTH
339   %token  T_UNDLINE
# Line 342 | Line 344 | reset_block_state(void)
344   %token  T_WALLOPS
345   %token  T_WEBIRC
346   %token  TBOOL
347 + %token  THROTTLE_COUNT
348   %token  THROTTLE_TIME
349   %token  TKLINE_EXPIRE_NOTICES
350   %token  TMASKED
348 %token  TRUE_NO_OPER_FLOOD
351   %token  TS_MAX_DELTA
352   %token  TS_WARN_DELTA
353   %token  TWODOTS
354   %token  TYPE
355   %token  UNKLINE
354 %token  USE_EGD
356   %token  USE_LOGGING
357   %token  USER
358   %token  VHOST
359   %token  VHOST6
360 < %token  WARN_NO_NLINE
360 > %token  WARN_NO_CONNECT_BLOCK
361 > %token  WHOIS
362 > %token  WHOWAS_HISTORY_LENGTH
363   %token  XLINE
364 + %token  XLINE_EXEMPT
365  
366   %type  <string> QSTRING
367   %type  <number> NUMBER
# Line 367 | Line 371 | reset_block_state(void)
371   %type  <number> sizespec_
372  
373   %%
374 < conf:  
374 > conf:
375          | conf conf_item
376          ;
377  
378   conf_item:        admin_entry
379                  | logging_entry
380                  | oper_entry
381 <                | channel_entry
382 <                | class_entry
381 >                | channel_entry
382 >                | class_entry
383                  | listen_entry
384                  | auth_entry
385                  | serverinfo_entry
386 <                | serverhide_entry
386 >                | serverhide_entry
387                  | resv_entry
388                  | service_entry
389                  | shared_entry
390 <                | cluster_entry
390 >                | cluster_entry
391                  | connect_entry
392                  | kill_entry
393                  | deny_entry
394 <                | exempt_entry
395 <                | general_entry
394 >                | exempt_entry
395 >                | general_entry
396                  | gecos_entry
397                  | modules_entry
398                  | motd_entry
399 +                | pseudo_entry
400                  | error ';'
401                  | error '}'
402          ;
403  
404  
405   timespec_: { $$ = 0; } | timespec;
406 < timespec:       NUMBER timespec_
407 <                {
408 <                        $$ = $1 + $2;
409 <                }
410 <                | NUMBER SECONDS timespec_
411 <                {
412 <                        $$ = $1 + $3;
413 <                }
414 <                | NUMBER MINUTES timespec_
415 <                {
416 <                        $$ = $1 * 60 + $3;
417 <                }
418 <                | NUMBER HOURS timespec_
419 <                {
420 <                        $$ = $1 * 60 * 60 + $3;
421 <                }
417 <                | NUMBER DAYS timespec_
418 <                {
419 <                        $$ = $1 * 60 * 60 * 24 + $3;
420 <                }
421 <                | NUMBER WEEKS timespec_
422 <                {
423 <                        $$ = $1 * 60 * 60 * 24 * 7 + $3;
424 <                }
425 <                | NUMBER MONTHS timespec_
426 <                {
427 <                        $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3;
428 <                }
429 <                | NUMBER YEARS timespec_
430 <                {
431 <                        $$ = $1 * 60 * 60 * 24 * 365 + $3;
432 <                }
433 <                ;
434 <
435 < sizespec_:      { $$ = 0; } | sizespec;
436 < sizespec:       NUMBER sizespec_ { $$ = $1 + $2; }
437 <                | NUMBER BYTES sizespec_ { $$ = $1 + $3; }
438 <                | NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; }
439 <                | NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
440 <                ;
406 > timespec:  NUMBER timespec_         { $$ = $1 + $2; } |
407 >           NUMBER SECONDS timespec_ { $$ = $1 + $3; } |
408 >           NUMBER MINUTES timespec_ { $$ = $1 * 60 + $3; } |
409 >           NUMBER HOURS timespec_   { $$ = $1 * 60 * 60 + $3; } |
410 >           NUMBER DAYS timespec_    { $$ = $1 * 60 * 60 * 24 + $3; } |
411 >           NUMBER WEEKS timespec_   { $$ = $1 * 60 * 60 * 24 * 7 + $3; } |
412 >           NUMBER MONTHS timespec_  { $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3; } |
413 >           NUMBER YEARS timespec_   { $$ = $1 * 60 * 60 * 24 * 365 + $3; }
414 >           ;
415 >
416 > sizespec_:  { $$ = 0; } | sizespec;
417 > sizespec:   NUMBER sizespec_ { $$ = $1 + $2; } |
418 >            NUMBER BYTES sizespec_ { $$ = $1 + $3; } |
419 >            NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; } |
420 >            NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
421 >            ;
422  
423  
424   /***************************************************************************
425 < *  section modules
425 > * modules {} section
426   ***************************************************************************/
427 < modules_entry: MODULES
447 <  '{' modules_items '}' ';';
427 > modules_entry: MODULES '{' modules_items '}' ';';
428  
429   modules_items:  modules_items modules_item | modules_item;
430   modules_item:   modules_module | modules_path | error ';' ;
# Line 462 | Line 442 | modules_path: PATH '=' QSTRING ';'
442   };
443  
444  
445 + /***************************************************************************
446 + * serverinfo {}  section
447 + ***************************************************************************/
448   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
449  
450   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
451 < serverinfo_item:        serverinfo_name | serverinfo_vhost |
452 <                        serverinfo_hub | serverinfo_description |
453 <                        serverinfo_network_name | serverinfo_network_desc |
454 <                        serverinfo_max_clients | serverinfo_max_nick_length |
455 <                        serverinfo_max_topic_length | serverinfo_ssl_dh_param_file |
456 <                        serverinfo_rsa_private_key_file | serverinfo_vhost6 |
457 <                        serverinfo_sid | serverinfo_ssl_certificate_file |
458 <                        serverinfo_ssl_client_method | serverinfo_ssl_server_method |
451 > serverinfo_item:        serverinfo_name |
452 >                        serverinfo_vhost |
453 >                        serverinfo_hub |
454 >                        serverinfo_description |
455 >                        serverinfo_network_name |
456 >                        serverinfo_network_desc |
457 >                        serverinfo_default_max_clients |
458 >                        serverinfo_max_nick_length |
459 >                        serverinfo_max_topic_length |
460 >                        serverinfo_ssl_dh_param_file |
461 >                        serverinfo_ssl_dh_elliptic_curve |
462 >                        serverinfo_rsa_private_key_file |
463 >                        serverinfo_vhost6 |
464 >                        serverinfo_sid |
465 >                        serverinfo_ssl_certificate_file |
466                          serverinfo_ssl_cipher_list |
467 <                        error ';' ;
468 <
467 >                        serverinfo_ssl_message_digest_algorithm |
468 >                        error ';' ;
469  
480 serverinfo_ssl_client_method: T_SSL_CLIENT_METHOD '=' client_method_types ';' ;
481 serverinfo_ssl_server_method: T_SSL_SERVER_METHOD '=' server_method_types ';' ;
482
483 client_method_types: client_method_types ',' client_method_type_item | client_method_type_item;
484 client_method_type_item: T_SSLV3
485 {
486 #ifdef HAVE_LIBCRYPTO
487  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
488    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv3);
489 #endif
490 } | T_TLSV1
491 {
492 #ifdef HAVE_LIBCRYPTO
493  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
494    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_TLSv1);
495 #endif
496 };
497
498 server_method_types: server_method_types ',' server_method_type_item | server_method_type_item;
499 server_method_type_item: T_SSLV3
500 {
501 #ifdef HAVE_LIBCRYPTO
502  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
503    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3);
504 #endif
505 } | T_TLSV1
506 {
507 #ifdef HAVE_LIBCRYPTO
508  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
509    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_TLSv1);
510 #endif
511 };
470  
471   serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
472   {
473 < #ifdef HAVE_LIBCRYPTO
516 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
473 >  if (conf_parser_ctx.pass == 2)
474    {
475 <    if (!ServerInfo.rsa_private_key_file)
476 <    {
520 <      conf_error_report("No rsa_private_key_file specified, SSL disabled");
521 <      break;
522 <    }
523 <
524 <    if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string,
525 <                                     SSL_FILETYPE_PEM) <= 0 ||
526 <        SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string,
527 <                                     SSL_FILETYPE_PEM) <= 0)
528 <    {
529 <      report_crypto_errors();
530 <      conf_error_report("Could not open/read certificate file");
531 <      break;
532 <    }
533 <
534 <    if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file,
535 <                                    SSL_FILETYPE_PEM) <= 0 ||
536 <        SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file,
537 <                                    SSL_FILETYPE_PEM) <= 0)
538 <    {
539 <      report_crypto_errors();
540 <      conf_error_report("Could not read RSA private key");
541 <      break;
542 <    }
543 <
544 <    if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) ||
545 <        !SSL_CTX_check_private_key(ServerInfo.client_ctx))
546 <    {
547 <      report_crypto_errors();
548 <      conf_error_report("Could not read RSA private key");
549 <      break;
550 <    }
475 >    xfree(ConfigServerInfo.ssl_certificate_file);
476 >    ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string);
477    }
552 #endif
478   };
479  
480   serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';'
481   {
482 < #ifdef HAVE_LIBCRYPTO
558 <  BIO *file = NULL;
559 <
560 <  if (conf_parser_ctx.pass != 1)
561 <    break;
562 <
563 <  if (ServerInfo.rsa_private_key)
564 <  {
565 <    RSA_free(ServerInfo.rsa_private_key);
566 <    ServerInfo.rsa_private_key = NULL;
567 <  }
568 <
569 <  if (ServerInfo.rsa_private_key_file)
570 <  {
571 <    MyFree(ServerInfo.rsa_private_key_file);
572 <    ServerInfo.rsa_private_key_file = NULL;
573 <  }
574 <
575 <  ServerInfo.rsa_private_key_file = xstrdup(yylval.string);
576 <
577 <  if ((file = BIO_new_file(yylval.string, "r")) == NULL)
482 >  if (conf_parser_ctx.pass == 2)
483    {
484 <    conf_error_report("File open failed, ignoring");
485 <    break;
484 >    xfree(ConfigServerInfo.rsa_private_key_file);
485 >    ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
486    }
487 + };
488  
489 <  ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
490 <
491 <  BIO_set_close(file, BIO_CLOSE);
586 <  BIO_free(file);
587 <
588 <  if (ServerInfo.rsa_private_key == NULL)
489 > serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
490 > {
491 >  if (conf_parser_ctx.pass == 2)
492    {
493 <    conf_error_report("Couldn't extract key, ignoring");
494 <    break;
592 <  }
593 <
594 <  if (!RSA_check_key(ServerInfo.rsa_private_key))
595 <  {
596 <    RSA_free(ServerInfo.rsa_private_key);
597 <    ServerInfo.rsa_private_key = NULL;
598 <
599 <    conf_error_report("Invalid key, ignoring");
600 <    break;
493 >    xfree(ConfigServerInfo.ssl_dh_param_file);
494 >    ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string);
495    }
496 + };
497  
498 <  /* require 2048 bit (256 byte) key */
499 <  if (RSA_size(ServerInfo.rsa_private_key) != 256)
498 > serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
499 > {
500 >  if (conf_parser_ctx.pass == 2)
501    {
502 <    RSA_free(ServerInfo.rsa_private_key);
503 <    ServerInfo.rsa_private_key = NULL;
608 <
609 <    conf_error_report("Not a 2048 bit key, ignoring");
502 >    xfree(ConfigServerInfo.ssl_cipher_list);
503 >    ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string);
504    }
611 #endif
505   };
506  
507 < serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
507 > serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
508   {
509 < /* TBD - XXX: error reporting */
617 < #ifdef HAVE_LIBCRYPTO
618 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
509 >  if (conf_parser_ctx.pass == 2)
510    {
511 <    BIO *file = BIO_new_file(yylval.string, "r");
512 <
622 <    if (file)
623 <    {
624 <      DH *dh = PEM_read_bio_DHparams(file, NULL, NULL, NULL);
625 <
626 <      BIO_free(file);
627 <
628 <      if (dh)
629 <      {
630 <        if (DH_size(dh) < 128)
631 <          conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
632 <        else
633 <          SSL_CTX_set_tmp_dh(ServerInfo.server_ctx, dh);
634 <
635 <        DH_free(dh);
636 <      }
637 <    }
511 >    xfree(ConfigServerInfo.ssl_message_digest_algorithm);
512 >    ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string);
513    }
514 < #endif
640 < };
514 > }
515  
516 < serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
516 > serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
517   {
518 < #ifdef HAVE_LIBCRYPTO
519 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
520 <    SSL_CTX_set_cipher_list(ServerInfo.server_ctx, yylval.string);
521 < #endif
518 >  if (conf_parser_ctx.pass == 2)
519 >  {
520 >    xfree(ConfigServerInfo.ssl_dh_elliptic_curve);
521 >    ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string);
522 >  }
523   };
524  
525 < serverinfo_name: NAME '=' QSTRING ';'
525 > serverinfo_name: NAME '=' QSTRING ';'
526   {
527 <  /* this isn't rehashable */
528 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.name)
527 >  /* This isn't rehashable */
528 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
529    {
530 <    if (valid_servname(yylval.string))
531 <      ServerInfo.name = xstrdup(yylval.string);
530 >    if (server_valid_name(yylval.string) == true)
531 >      ConfigServerInfo.name = xstrdup(yylval.string);
532      else
533      {
534        conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
535 <      exit(0);
535 >      exit(EXIT_FAILURE);
536      }
537    }
538   };
539  
540 < serverinfo_sid: IRCD_SID '=' QSTRING ';'
540 > serverinfo_sid: IRCD_SID '=' QSTRING ';'
541   {
542 <  /* this isn't rehashable */
543 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.sid)
542 >  /* This isn't rehashable */
543 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
544    {
545      if (valid_sid(yylval.string))
546 <      ServerInfo.sid = xstrdup(yylval.string);
546 >      ConfigServerInfo.sid = xstrdup(yylval.string);
547      else
548      {
549        conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
550 <      exit(0);
550 >      exit(EXIT_FAILURE);
551      }
552    }
553   };
# Line 681 | Line 556 | serverinfo_description: DESCRIPTION '='
556   {
557    if (conf_parser_ctx.pass == 2)
558    {
559 <    MyFree(ServerInfo.description);
560 <    ServerInfo.description = xstrdup(yylval.string);
559 >    xfree(ConfigServerInfo.description);
560 >    ConfigServerInfo.description = xstrdup(yylval.string);
561 >    strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info));
562    }
563   };
564  
# Line 692 | Line 568 | serverinfo_network_name: NETWORK_NAME '=
568    {
569      char *p;
570  
571 <    if ((p = strchr(yylval.string, ' ')) != NULL)
572 <      p = '\0';
571 >    if ((p = strchr(yylval.string, ' ')))
572 >      *p = '\0';
573  
574 <    MyFree(ServerInfo.network_name);
575 <    ServerInfo.network_name = xstrdup(yylval.string);
574 >    xfree(ConfigServerInfo.network_name);
575 >    ConfigServerInfo.network_name = xstrdup(yylval.string);
576    }
577   };
578  
# Line 705 | Line 581 | serverinfo_network_desc: NETWORK_DESC '=
581    if (conf_parser_ctx.pass != 2)
582      break;
583  
584 <  MyFree(ServerInfo.network_desc);
585 <  ServerInfo.network_desc = xstrdup(yylval.string);
584 >  xfree(ConfigServerInfo.network_desc);
585 >  ConfigServerInfo.network_desc = xstrdup(yylval.string);
586   };
587  
588   serverinfo_vhost: VHOST '=' QSTRING ';'
# Line 725 | Line 601 | serverinfo_vhost: VHOST '=' QSTRING ';'
601        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string);
602      else
603      {
604 <      assert(res != NULL);
604 >      assert(res);
605  
606 <      memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen);
607 <      ServerInfo.ip.ss.ss_family = res->ai_family;
608 <      ServerInfo.ip.ss_len = res->ai_addrlen;
606 >      memcpy(&ConfigServerInfo.ip, res->ai_addr, res->ai_addrlen);
607 >      ConfigServerInfo.ip.ss.ss_family = res->ai_family;
608 >      ConfigServerInfo.ip.ss_len = res->ai_addrlen;
609        freeaddrinfo(res);
610  
611 <      ServerInfo.specific_ipv4_vhost = 1;
611 >      ConfigServerInfo.specific_ipv4_vhost = 1;
612      }
613    }
614   };
615  
616   serverinfo_vhost6: VHOST6 '=' QSTRING ';'
617   {
742 #ifdef IPV6
618    if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
619    {
620      struct addrinfo hints, *res;
# Line 754 | Line 629 | serverinfo_vhost6: VHOST6 '=' QSTRING ';
629        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string);
630      else
631      {
632 <      assert(res != NULL);
632 >      assert(res);
633  
634 <      memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen);
635 <      ServerInfo.ip6.ss.ss_family = res->ai_family;
636 <      ServerInfo.ip6.ss_len = res->ai_addrlen;
634 >      memcpy(&ConfigServerInfo.ip6, res->ai_addr, res->ai_addrlen);
635 >      ConfigServerInfo.ip6.ss.ss_family = res->ai_family;
636 >      ConfigServerInfo.ip6.ss_len = res->ai_addrlen;
637        freeaddrinfo(res);
638  
639 <      ServerInfo.specific_ipv6_vhost = 1;
639 >      ConfigServerInfo.specific_ipv6_vhost = 1;
640      }
641    }
767 #endif
642   };
643  
644 < serverinfo_max_clients: T_MAX_CLIENTS '=' NUMBER ';'
644 > serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';'
645   {
646    if (conf_parser_ctx.pass != 2)
647      break;
648  
649    if ($3 < MAXCLIENTS_MIN)
650    {
651 <    char buf[IRCD_BUFSIZE];
651 >    char buf[IRCD_BUFSIZE] = "";
652  
653      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
654      conf_error_report(buf);
655 <    ServerInfo.max_clients = MAXCLIENTS_MIN;
655 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MIN;
656    }
657    else if ($3 > MAXCLIENTS_MAX)
658    {
659 <    char buf[IRCD_BUFSIZE];
659 >    char buf[IRCD_BUFSIZE] = "";
660  
661      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
662      conf_error_report(buf);
663 <    ServerInfo.max_clients = MAXCLIENTS_MAX;
663 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX;
664    }
665    else
666 <    ServerInfo.max_clients = $3;
666 >    ConfigServerInfo.default_max_clients = $3;
667   };
668  
669   serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';'
# Line 800 | Line 674 | serverinfo_max_nick_length: MAX_NICK_LEN
674    if ($3 < 9)
675    {
676      conf_error_report("max_nick_length too low, setting to 9");
677 <    ServerInfo.max_nick_length = 9;
677 >    ConfigServerInfo.max_nick_length = 9;
678    }
679    else if ($3 > NICKLEN)
680    {
681 <    char buf[IRCD_BUFSIZE];
681 >    char buf[IRCD_BUFSIZE] = "";
682  
683      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
684      conf_error_report(buf);
685 <    ServerInfo.max_nick_length = NICKLEN;
685 >    ConfigServerInfo.max_nick_length = NICKLEN;
686    }
687    else
688 <    ServerInfo.max_nick_length = $3;
688 >    ConfigServerInfo.max_nick_length = $3;
689   };
690  
691   serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';'
# Line 822 | Line 696 | serverinfo_max_topic_length: MAX_TOPIC_L
696    if ($3 < 80)
697    {
698      conf_error_report("max_topic_length too low, setting to 80");
699 <    ServerInfo.max_topic_length = 80;
699 >    ConfigServerInfo.max_topic_length = 80;
700    }
701    else if ($3 > TOPICLEN)
702    {
703 <    char buf[IRCD_BUFSIZE];
703 >    char buf[IRCD_BUFSIZE] = "";
704  
705      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
706      conf_error_report(buf);
707 <    ServerInfo.max_topic_length = TOPICLEN;
707 >    ConfigServerInfo.max_topic_length = TOPICLEN;
708    }
709    else
710 <    ServerInfo.max_topic_length = $3;
710 >    ConfigServerInfo.max_topic_length = $3;
711   };
712  
713 < serverinfo_hub: HUB '=' TBOOL ';'
713 > serverinfo_hub: HUB '=' TBOOL ';'
714   {
715    if (conf_parser_ctx.pass == 2)
716 <    ServerInfo.hub = yylval.number;
716 >    ConfigServerInfo.hub = yylval.number;
717   };
718  
719 +
720   /***************************************************************************
721 < * admin section
721 > * admin {} section
722   ***************************************************************************/
723   admin_entry: ADMIN  '{' admin_items '}' ';' ;
724  
725   admin_items: admin_items admin_item | admin_item;
726 < admin_item:  admin_name | admin_description |
727 <             admin_email | error ';' ;
726 > admin_item:  admin_name |
727 >             admin_description |
728 >             admin_email |
729 >             error ';' ;
730  
731 < admin_name: NAME '=' QSTRING ';'
731 > admin_name: NAME '=' QSTRING ';'
732   {
733    if (conf_parser_ctx.pass != 2)
734      break;
735  
736 <  MyFree(AdminInfo.name);
737 <  AdminInfo.name = xstrdup(yylval.string);
736 >  xfree(ConfigAdminInfo.name);
737 >  ConfigAdminInfo.name = xstrdup(yylval.string);
738   };
739  
740   admin_email: EMAIL '=' QSTRING ';'
# Line 865 | Line 742 | admin_email: EMAIL '=' QSTRING ';'
742    if (conf_parser_ctx.pass != 2)
743      break;
744  
745 <  MyFree(AdminInfo.email);
746 <  AdminInfo.email = xstrdup(yylval.string);
745 >  xfree(ConfigAdminInfo.email);
746 >  ConfigAdminInfo.email = xstrdup(yylval.string);
747   };
748  
749   admin_description: DESCRIPTION '=' QSTRING ';'
# Line 874 | Line 751 | admin_description: DESCRIPTION '=' QSTRI
751    if (conf_parser_ctx.pass != 2)
752      break;
753  
754 <  MyFree(AdminInfo.description);
755 <  AdminInfo.description = xstrdup(yylval.string);
754 >  xfree(ConfigAdminInfo.description);
755 >  ConfigAdminInfo.description = xstrdup(yylval.string);
756   };
757  
758 +
759   /***************************************************************************
760 < * motd section
760 > * motd {} section
761   ***************************************************************************/
762 < motd_entry: MOTD
762 > motd_entry: MOTD
763   {
764    if (conf_parser_ctx.pass == 2)
765      reset_block_state();
766   } '{' motd_items '}' ';'
767   {
768 <  dlink_node *ptr = NULL;
768 >  dlink_node *node = NULL;
769  
770    if (conf_parser_ctx.pass != 2)
771      break;
# Line 895 | Line 773 | motd_entry: MOTD
773    if (!block_state.file.buf[0])
774      break;
775  
776 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
777 <    motd_add(ptr->data, block_state.file.buf);
776 >  DLINK_FOREACH(node, block_state.mask.list.head)
777 >    motd_add(node->data, block_state.file.buf);
778   };
779  
780   motd_items: motd_items motd_item | motd_item;
781   motd_item:  motd_mask | motd_file | error ';' ;
782  
783 < motd_mask: MASK '=' QSTRING ';'
783 > motd_mask: MASK '=' QSTRING ';'
784   {
785    if (conf_parser_ctx.pass == 2)
786      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list);
# Line 914 | Line 792 | motd_file: T_FILE '=' QSTRING ';'
792      strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
793   };
794  
795 +
796   /***************************************************************************
797 < *  section logging
797 > * pseudo {} section
798 > ***************************************************************************/
799 > pseudo_entry: T_PSEUDO
800 > {
801 >  if (conf_parser_ctx.pass == 2)
802 >    reset_block_state();
803 > } '{' pseudo_items '}' ';'
804 > {
805 >  if (conf_parser_ctx.pass != 2)
806 >    break;
807 >
808 >  if (!block_state.command.buf[0] ||
809 >      !block_state.name.buf[0] ||
810 >      !block_state.nick.buf[0] ||
811 >      !block_state.host.buf[0])
812 >    break;
813 >
814 >  pseudo_register(block_state.name.buf, block_state.nick.buf, block_state.host.buf,
815 >                  block_state.prepend.buf, block_state.command.buf);
816 > };
817 >
818 > pseudo_items: pseudo_items pseudo_item | pseudo_item;
819 > pseudo_item:  pseudo_command | pseudo_prepend | pseudo_name | pseudo_target | error ';' ;
820 >
821 > pseudo_command: T_COMMAND '=' QSTRING ';'
822 > {
823 >  if (conf_parser_ctx.pass == 2)
824 >    strlcpy(block_state.command.buf, yylval.string, sizeof(block_state.command.buf));
825 > };
826 >
827 > pseudo_name: NAME '=' QSTRING ';'
828 > {
829 >  if (conf_parser_ctx.pass == 2)
830 >    strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
831 > };
832 >
833 > pseudo_prepend: T_PREPEND '=' QSTRING ';'
834 > {
835 >  if (conf_parser_ctx.pass == 2)
836 >    strlcpy(block_state.prepend.buf, yylval.string, sizeof(block_state.prepend.buf));
837 > };
838 >
839 > pseudo_target: T_TARGET '=' QSTRING ';'
840 > {
841 >  if (conf_parser_ctx.pass == 2)
842 >  {
843 >    struct split_nuh_item nuh;
844 >
845 >    nuh.nuhmask  = yylval.string;
846 >    nuh.nickptr  = NULL;
847 >    nuh.userptr  = block_state.nick.buf;
848 >    nuh.hostptr  = block_state.host.buf;
849 >    nuh.nicksize = 0;
850 >    nuh.usersize = sizeof(block_state.nick.buf);
851 >    nuh.hostsize = sizeof(block_state.host.buf);
852 >
853 >    split_nuh(&nuh);
854 >  }
855 > };
856 >
857 >
858 > /***************************************************************************
859 > * log {} section
860   ***************************************************************************/
861   logging_entry:          T_LOG  '{' logging_items '}' ';' ;
862   logging_items:          logging_items logging_item | logging_item ;
863  
864 < logging_item:           logging_use_logging | logging_file_entry |
865 <                        error ';' ;
864 > logging_item:           logging_use_logging | logging_file_entry |
865 >                        error ';' ;
866  
867   logging_use_logging: USE_LOGGING '=' TBOOL ';'
868   {
869    if (conf_parser_ctx.pass == 2)
870 <    ConfigLoggingEntry.use_logging = yylval.number;
870 >    ConfigLog.use_logging = yylval.number;
871   };
872  
873   logging_file_entry:
# Line 980 | Line 921 | logging_file_type_item:  USER
921   {
922    if (conf_parser_ctx.pass == 2)
923      block_state.type.value = LOG_TYPE_OPER;
983 } | GLINE
984 {
985  if (conf_parser_ctx.pass == 2)
986    block_state.type.value = LOG_TYPE_GLINE;
924   } | XLINE
925   {
926    if (conf_parser_ctx.pass == 2)
# Line 1012 | Line 949 | logging_file_type_item:  USER
949  
950  
951   /***************************************************************************
952 < * section oper
952 > * operator {} section
953   ***************************************************************************/
954 < oper_entry: OPERATOR
954 > oper_entry: OPERATOR
955   {
956    if (conf_parser_ctx.pass != 2)
957      break;
# Line 1023 | Line 960 | oper_entry: OPERATOR
960    block_state.flags.value |= CONF_FLAGS_ENCRYPTED;
961   } '{' oper_items '}' ';'
962   {
963 <  dlink_node *ptr = NULL;
963 >  dlink_node *node = NULL;
964  
965    if (conf_parser_ctx.pass != 2)
966      break;
967  
968    if (!block_state.name.buf[0])
969      break;
970 < #ifdef HAVE_LIBCRYPTO
1034 <  if (!block_state.file.buf[0] &&
1035 <      !block_state.rpass.buf[0])
1036 <    break;
1037 < #else
970 >
971    if (!block_state.rpass.buf[0])
972      break;
1040 #endif
973  
974 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
974 >  DLINK_FOREACH(node, block_state.mask.list.head)
975    {
976      struct MaskItem *conf = NULL;
977      struct split_nuh_item nuh;
978 +    char *s = node->data;
979  
980 <    nuh.nuhmask  = ptr->data;
980 >    if (EmptyString(s))
981 >      continue;
982 >
983 >    nuh.nuhmask  = s;
984      nuh.nickptr  = NULL;
985      nuh.userptr  = block_state.user.buf;
986      nuh.hostptr  = block_state.host.buf;
# Line 1064 | Line 1000 | oper_entry: OPERATOR
1000      if (block_state.rpass.buf[0])
1001        conf->passwd = xstrdup(block_state.rpass.buf);
1002  
1003 +    if (block_state.whois.buf[0])
1004 +      conf->whois = xstrdup(block_state.whois.buf);
1005 +
1006      conf->flags = block_state.flags.value;
1007      conf->modes = block_state.modes.value;
1008      conf->port  = block_state.port.value;
1009      conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits);
1010  
1011      conf_add_class_to_conf(conf, block_state.class.buf);
1073
1074 #ifdef HAVE_LIBCRYPTO
1075    if (block_state.file.buf[0])
1076    {
1077      BIO *file = NULL;
1078      RSA *pkey = NULL;
1079
1080      if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1081      {
1082        conf_error_report("Ignoring rsa_public_key_file -- file doesn't exist");
1083        break;
1084      }
1085
1086      if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1087        conf_error_report("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
1088
1089      conf->rsa_public_key = pkey;
1090      BIO_set_close(file, BIO_CLOSE);
1091      BIO_free(file);
1092    }
1093 #endif /* HAVE_LIBCRYPTO */
1012    }
1013   };
1014  
1015   oper_items:     oper_items oper_item | oper_item;
1016 < oper_item:      oper_name | oper_user | oper_password |
1017 <                oper_umodes | oper_class | oper_encrypted |
1018 <                oper_rsa_public_key_file | oper_ssl_certificate_fingerprint |
1019 <                oper_ssl_connection_required |
1020 <                oper_flags | error ';' ;
1016 > oper_item:      oper_name |
1017 >                oper_user |
1018 >                oper_password |
1019 >                oper_whois |
1020 >                oper_umodes |
1021 >                oper_class |
1022 >                oper_encrypted |
1023 >                oper_ssl_certificate_fingerprint |
1024 >                oper_ssl_connection_required |
1025 >                oper_flags |
1026 >                error ';' ;
1027  
1028   oper_name: NAME '=' QSTRING ';'
1029   {
# Line 1119 | Line 1043 | oper_password: PASSWORD '=' QSTRING ';'
1043      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1044   };
1045  
1046 + oper_whois: WHOIS '=' QSTRING ';'
1047 + {
1048 +  if (conf_parser_ctx.pass == 2)
1049 +    strlcpy(block_state.whois.buf, yylval.string, sizeof(block_state.whois.buf));
1050 + };
1051 +
1052   oper_encrypted: ENCRYPTED '=' TBOOL ';'
1053   {
1054    if (conf_parser_ctx.pass != 2)
# Line 1130 | Line 1060 | oper_encrypted: ENCRYPTED '=' TBOOL ';'
1060      block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED;
1061   };
1062  
1133 oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';'
1134 {
1135  if (conf_parser_ctx.pass == 2)
1136    strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
1137 };
1138
1063   oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1064   {
1065    if (conf_parser_ctx.pass == 2)
# Line 1190 | Line 1114 | oper_umodes_item:  T_BOTS
1114   {
1115    if (conf_parser_ctx.pass == 2)
1116      block_state.modes.value |= UMODE_HIDDEN;
1117 + } | HIDE_CHANS
1118 + {
1119 +  if (conf_parser_ctx.pass == 2)
1120 +    block_state.modes.value |= UMODE_HIDECHANS;
1121 + } | HIDE_IDLE
1122 + {
1123 +  if (conf_parser_ctx.pass == 2)
1124 +    block_state.modes.value |= UMODE_HIDEIDLE;
1125   } | T_SKILL
1126   {
1127    if (conf_parser_ctx.pass == 2)
# Line 1214 | Line 1146 | oper_umodes_item:  T_BOTS
1146   {
1147    if (conf_parser_ctx.pass == 2)
1148      block_state.modes.value |= UMODE_EXTERNAL;
1217 } | T_OPERWALL
1218 {
1219  if (conf_parser_ctx.pass == 2)
1220    block_state.modes.value |= UMODE_OPERWALL;
1149   } | T_SERVNOTICE
1150   {
1151    if (conf_parser_ctx.pass == 2)
# Line 1286 | Line 1214 | oper_flags_item: KILL ':' REMOTE
1214   } | KLINE
1215   {
1216    if (conf_parser_ctx.pass == 2)
1217 <    block_state.port.value |= OPER_FLAG_K;
1217 >    block_state.port.value |= OPER_FLAG_KLINE;
1218   } | UNKLINE
1219   {
1220    if (conf_parser_ctx.pass == 2)
# Line 1302 | Line 1230 | oper_flags_item: KILL ':' REMOTE
1230   } | XLINE
1231   {
1232    if (conf_parser_ctx.pass == 2)
1233 <    block_state.port.value |= OPER_FLAG_X;
1234 < } | GLINE
1233 >    block_state.port.value |= OPER_FLAG_XLINE;
1234 > } | T_UNXLINE
1235   {
1236    if (conf_parser_ctx.pass == 2)
1237 <    block_state.port.value |= OPER_FLAG_GLINE;
1237 >    block_state.port.value |= OPER_FLAG_UNXLINE;
1238   } | DIE
1239   {
1240    if (conf_parser_ctx.pass == 2)
# Line 1315 | Line 1243 | oper_flags_item: KILL ':' REMOTE
1243   {
1244    if (conf_parser_ctx.pass == 2)
1245      block_state.port.value |= OPER_FLAG_RESTART;
1246 + } | REHASH ':' REMOTE
1247 + {
1248 +  if (conf_parser_ctx.pass == 2)
1249 +    block_state.port.value |= OPER_FLAG_REHASH_REMOTE;
1250   } | REHASH
1251   {
1252    if (conf_parser_ctx.pass == 2)
# Line 1323 | Line 1255 | oper_flags_item: KILL ':' REMOTE
1255   {
1256    if (conf_parser_ctx.pass == 2)
1257      block_state.port.value |= OPER_FLAG_ADMIN;
1326 } | T_OPERWALL
1327 {
1328  if (conf_parser_ctx.pass == 2)
1329    block_state.port.value |= OPER_FLAG_OPERWALL;
1258   } | T_GLOBOPS
1259   {
1260    if (conf_parser_ctx.pass == 2)
# Line 1351 | Line 1279 | oper_flags_item: KILL ':' REMOTE
1279   {
1280    if (conf_parser_ctx.pass == 2)
1281      block_state.port.value |= OPER_FLAG_MODULE;
1282 + } | T_OPME
1283 + {
1284 +  if (conf_parser_ctx.pass == 2)
1285 +    block_state.port.value |= OPER_FLAG_OPME;
1286 + } | NICK ':' RESV
1287 + {
1288 +  if (conf_parser_ctx.pass == 2)
1289 +    block_state.port.value |= OPER_FLAG_NICK_RESV;
1290 + } | JOIN ':' RESV
1291 + {
1292 +  if (conf_parser_ctx.pass == 2)
1293 +    block_state.port.value |= OPER_FLAG_JOIN_RESV;
1294 + } | RESV
1295 + {
1296 +  if (conf_parser_ctx.pass == 2)
1297 +    block_state.port.value |= OPER_FLAG_RESV;
1298 + } | T_UNRESV
1299 + {
1300 +  if (conf_parser_ctx.pass == 2)
1301 +    block_state.port.value |= OPER_FLAG_UNRESV;
1302 + } | CLOSE
1303 + {
1304 +  if (conf_parser_ctx.pass == 2)
1305 +    block_state.port.value |= OPER_FLAG_CLOSE;
1306   };
1307  
1308  
1309   /***************************************************************************
1310 < *  section class
1310 > * class {} section
1311   ***************************************************************************/
1312   class_entry: CLASS
1313   {
# Line 1379 | Line 1331 | class_entry: CLASS
1331    if (!block_state.class.buf[0])
1332      break;
1333  
1334 <  if (!(class = class_find(block_state.class.buf, 0)))
1334 >  if (!(class = class_find(block_state.class.buf, false)))
1335      class = class_make();
1336  
1337    class->active = 1;
1338 <  MyFree(class->name);
1338 >  xfree(class->name);
1339    class->name = xstrdup(block_state.class.buf);
1340    class->ping_freq = block_state.ping_freq.value;
1341 <  class->max_perip = block_state.max_perip.value;
1341 >  class->max_perip_local = block_state.max_perip_local.value;
1342 >  class->max_perip_global = block_state.max_perip_global.value;
1343    class->con_freq = block_state.con_freq.value;
1344    class->max_total = block_state.max_total.value;
1392  class->max_global = block_state.max_global.value;
1393  class->max_local = block_state.max_local.value;
1394  class->max_ident = block_state.max_ident.value;
1345    class->max_sendq = block_state.max_sendq.value;
1346    class->max_recvq = block_state.max_recvq.value;
1347 +  class->max_channels = block_state.max_channels.value;
1348  
1349    if (block_state.min_idle.value > block_state.max_idle.value)
1350    {
# Line 1406 | Line 1357 | class_entry: CLASS
1357    class->min_idle = block_state.min_idle.value;
1358    class->max_idle = block_state.max_idle.value;
1359  
1360 <  if (class->number_per_cidr && block_state.number_per_cidr.value)
1361 <    if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1411 <        (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
1412 <      if ((class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value) ||
1413 <          (class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value))
1414 <        rebuild_cidr_list(class);
1415 <
1360 >  int diff = (class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value ||
1361 >              class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value);
1362    class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value;
1363    class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value;
1364    class->number_per_cidr = block_state.number_per_cidr.value;
1365 +
1366 +  if (diff)
1367 +    class_ip_limit_rebuild(class);
1368   };
1369  
1370   class_items:    class_items class_item | class_item;
1371   class_item:     class_name |
1372 <                class_cidr_bitlen_ipv4 | class_cidr_bitlen_ipv6 |
1372 >                class_cidr_bitlen_ipv4 |
1373 >                class_cidr_bitlen_ipv6 |
1374                  class_ping_time |
1375 <                class_number_per_cidr |
1376 <                class_number_per_ip |
1375 >                class_number_per_cidr |
1376 >                class_number_per_ip_local |
1377 >                class_number_per_ip_global |
1378                  class_connectfreq |
1379 +                class_max_channels |
1380                  class_max_number |
1381 <                class_max_global |
1382 <                class_max_local |
1431 <                class_max_ident |
1432 <                class_sendq | class_recvq |
1381 >                class_sendq |
1382 >                class_recvq |
1383                  class_min_idle |
1384                  class_max_idle |
1385                  class_flags |
1386 <                error ';' ;
1386 >                error ';' ;
1387  
1388 < class_name: NAME '=' QSTRING ';'
1388 > class_name: NAME '=' QSTRING ';'
1389   {
1390    if (conf_parser_ctx.pass == 1)
1391      strlcpy(block_state.class.buf, yylval.string, sizeof(block_state.class.buf));
# Line 1447 | Line 1397 | class_ping_time: PING_TIME '=' timespec
1397      block_state.ping_freq.value = $3;
1398   };
1399  
1400 < class_number_per_ip: NUMBER_PER_IP '=' NUMBER ';'
1451 < {
1452 <  if (conf_parser_ctx.pass == 1)
1453 <    block_state.max_perip.value = $3;
1454 < };
1455 <
1456 < class_connectfreq: CONNECTFREQ '=' timespec ';'
1400 > class_number_per_ip_local: NUMBER_PER_IP_LOCAL '=' NUMBER ';'
1401   {
1402    if (conf_parser_ctx.pass == 1)
1403 <    block_state.con_freq.value = $3;
1403 >    block_state.max_perip_local.value = $3;
1404   };
1405  
1406 < class_max_number: MAX_NUMBER '=' NUMBER ';'
1406 > class_number_per_ip_global: NUMBER_PER_IP_GLOBAL '=' NUMBER ';'
1407   {
1408    if (conf_parser_ctx.pass == 1)
1409 <    block_state.max_total.value = $3;
1409 >    block_state.max_perip_global.value = $3;
1410   };
1411  
1412 < class_max_global: MAX_GLOBAL '=' NUMBER ';'
1412 > class_connectfreq: CONNECTFREQ '=' timespec ';'
1413   {
1414    if (conf_parser_ctx.pass == 1)
1415 <    block_state.max_global.value = $3;
1415 >    block_state.con_freq.value = $3;
1416   };
1417  
1418 < class_max_local: MAX_LOCAL '=' NUMBER ';'
1418 > class_max_channels: MAX_CHANNELS '=' NUMBER ';'
1419   {
1420    if (conf_parser_ctx.pass == 1)
1421 <    block_state.max_local.value = $3;
1421 >    block_state.max_channels.value = $3;
1422   };
1423  
1424 < class_max_ident: MAX_IDENT '=' NUMBER ';'
1424 > class_max_number: MAX_NUMBER '=' NUMBER ';'
1425   {
1426    if (conf_parser_ctx.pass == 1)
1427 <    block_state.max_ident.value = $3;
1427 >    block_state.max_total.value = $3;
1428   };
1429  
1430   class_sendq: SENDQ '=' sizespec ';'
# Line 1551 | Line 1495 | class_flags_item: RANDOM_IDLE
1495  
1496  
1497   /***************************************************************************
1498 < *  section listen
1498 > * listen {} section
1499   ***************************************************************************/
1500   listen_entry: LISTEN
1501   {
# Line 1590 | Line 1534 | port_item: NUMBER
1534   {
1535    if (conf_parser_ctx.pass == 2)
1536    {
1537 + #ifndef HAVE_TLS
1538      if (block_state.flags.value & LISTENER_SSL)
1539 < #ifdef HAVE_LIBCRYPTO
1540 <      if (!ServerInfo.server_ctx)
1539 >    {
1540 >      conf_error_report("TLS not available - port closed");
1541 >      break;
1542 >    }
1543   #endif
1544 <      {
1598 <        conf_error_report("SSL not available - port closed");
1599 <        break;
1600 <      }
1601 <    add_listener($1, block_state.addr.buf, block_state.flags.value);
1544 >    listener_add($1, block_state.addr.buf, block_state.flags.value);
1545    }
1546   } | NUMBER TWODOTS NUMBER
1547   {
1548    if (conf_parser_ctx.pass == 2)
1549    {
1550 <    int i;
1608 <
1550 > #ifndef HAVE_TLS
1551      if (block_state.flags.value & LISTENER_SSL)
1552 < #ifdef HAVE_LIBCRYPTO
1553 <      if (!ServerInfo.server_ctx)
1552 >    {
1553 >      conf_error_report("TLS not available - port closed");
1554 >      break;
1555 >    }
1556   #endif
1613      {
1614        conf_error_report("SSL not available - port closed");
1615        break;
1616      }
1557  
1558 <    for (i = $1; i <= $3; ++i)
1559 <      add_listener(i, block_state.addr.buf, block_state.flags.value);
1558 >    for (int i = $1; i <= $3; ++i)
1559 >      listener_add(i, block_state.addr.buf, block_state.flags.value);
1560    }
1561   };
1562  
# Line 1632 | Line 1572 | listen_host: HOST '=' QSTRING ';'
1572      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
1573   };
1574  
1575 +
1576   /***************************************************************************
1577 < *  section auth
1577 > * auth {} section
1578   ***************************************************************************/
1579   auth_entry: IRCD_AUTH
1580   {
# Line 1641 | Line 1582 | auth_entry: IRCD_AUTH
1582      reset_block_state();
1583   } '{' auth_items '}' ';'
1584   {
1585 <  dlink_node *ptr = NULL;
1585 >  dlink_node *node = NULL;
1586  
1587    if (conf_parser_ctx.pass != 2)
1588      break;
1589  
1590 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1590 >  DLINK_FOREACH(node, block_state.mask.list.head)
1591    {
1592      struct MaskItem *conf = NULL;
1593      struct split_nuh_item nuh;
1594 +    char *s = node->data;
1595 +
1596 +    if (EmptyString(s))
1597 +      continue;
1598  
1599 <    nuh.nuhmask  = ptr->data;
1599 >    nuh.nuhmask  = s;
1600      nuh.nickptr  = NULL;
1601      nuh.userptr  = block_state.user.buf;
1602      nuh.hostptr  = block_state.host.buf;
# Line 1675 | Line 1620 | auth_entry: IRCD_AUTH
1620      conf_add_class_to_conf(conf, block_state.class.buf);
1621      add_conf_by_address(CONF_CLIENT, conf);
1622    }
1623 < };
1623 > };
1624  
1625   auth_items:     auth_items auth_item | auth_item;
1626 < auth_item:      auth_user | auth_passwd | auth_class | auth_flags |
1627 <                auth_spoof | auth_redir_serv | auth_redir_port |
1628 <                auth_encrypted | error ';' ;
1626 > auth_item:      auth_user |
1627 >                auth_passwd |
1628 >                auth_class |
1629 >                auth_flags |
1630 >                auth_spoof |
1631 >                auth_redir_serv |
1632 >                auth_redir_port |
1633 >                auth_encrypted |
1634 >                error ';' ;
1635  
1636   auth_user: USER '=' QSTRING ';'
1637   {
# Line 1730 | Line 1681 | auth_flags_item: SPOOF_NOTICE
1681   {
1682    if (conf_parser_ctx.pass == 2)
1683      block_state.flags.value |= CONF_FLAGS_EXEMPTKLINE;
1684 + } | XLINE_EXEMPT
1685 + {
1686 +  if (conf_parser_ctx.pass == 2)
1687 +    block_state.flags.value |= CONF_FLAGS_EXEMPTXLINE;
1688   } | NEED_IDENT
1689   {
1690    if (conf_parser_ctx.pass == 2)
# Line 1742 | Line 1697 | auth_flags_item: SPOOF_NOTICE
1697   {
1698    if (conf_parser_ctx.pass == 2)
1699      block_state.flags.value |= CONF_FLAGS_NO_TILDE;
1745 } | GLINE_EXEMPT
1746 {
1747  if (conf_parser_ctx.pass == 2)
1748    block_state.flags.value |= CONF_FLAGS_EXEMPTGLINE;
1700   } | RESV_EXEMPT
1701   {
1702    if (conf_parser_ctx.pass == 2)
# Line 1760 | Line 1711 | auth_flags_item: SPOOF_NOTICE
1711      block_state.flags.value |= CONF_FLAGS_NEED_PASSWORD;
1712   };
1713  
1714 < auth_spoof: SPOOF '=' QSTRING ';'
1714 > auth_spoof: SPOOF '=' QSTRING ';'
1715   {
1716    if (conf_parser_ctx.pass != 2)
1717      break;
1718  
1719 <  if (strlen(yylval.string) <= HOSTLEN && valid_hostname(yylval.string))
1719 >  if (valid_hostname(yylval.string))
1720    {
1721      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
1722      block_state.flags.value |= CONF_FLAGS_SPOOF_IP;
# Line 1794 | Line 1745 | auth_redir_port: REDIRPORT '=' NUMBER ';
1745  
1746  
1747   /***************************************************************************
1748 < *  section resv
1748 > * resv {} section
1749   ***************************************************************************/
1750   resv_entry: RESV
1751   {
# Line 1808 | Line 1759 | resv_entry: RESV
1759    if (conf_parser_ctx.pass != 2)
1760      break;
1761  
1762 <  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1762 >  resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1763   };
1764  
1765 < resv_items:     resv_items resv_item | resv_item;
1766 < resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1765 > resv_items:     resv_items resv_item | resv_item;
1766 > resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1767  
1768   resv_mask: MASK '=' QSTRING ';'
1769   {
# Line 1834 | Line 1785 | resv_exempt: EXEMPT '=' QSTRING ';'
1785  
1786  
1787   /***************************************************************************
1788 < *  section service
1788 > * service {} section
1789   ***************************************************************************/
1790   service_entry: T_SERVICE '{' service_items '}' ';';
1791  
# Line 1846 | Line 1797 | service_name: NAME '=' QSTRING ';'
1797    if (conf_parser_ctx.pass != 2)
1798      break;
1799  
1800 <  if (valid_servname(yylval.string))
1800 >  if (server_valid_name(yylval.string) == true)
1801    {
1802 <    struct MaskItem *conf = conf_make(CONF_SERVICE);
1803 <    conf->name = xstrdup(yylval.string);
1802 >    struct ServiceItem *service = service_make();
1803 >    service->name = xstrdup(yylval.string);
1804    }
1805   };
1806  
1807 +
1808   /***************************************************************************
1809 < *  section shared, for sharing remote klines etc.
1809 > * shared {} section, for sharing remote klines etc.
1810   ***************************************************************************/
1811   shared_entry: T_SHARED
1812   {
# Line 1869 | Line 1821 | shared_entry: T_SHARED
1821    block_state.flags.value = SHARED_ALL;
1822   } '{' shared_items '}' ';'
1823   {
1872  struct MaskItem *conf = NULL;
1873
1824    if (conf_parser_ctx.pass != 2)
1825      break;
1826  
1827 <  conf = conf_make(CONF_ULINE);
1828 <  conf->flags = block_state.flags.value;
1829 <  conf->name = xstrdup(block_state.name.buf);
1830 <  conf->user = xstrdup(block_state.user.buf);
1831 <  conf->host = xstrdup(block_state.host.buf);
1827 >  struct SharedItem *shared = shared_make();
1828 >  shared->type = block_state.flags.value;
1829 >  shared->server = xstrdup(block_state.name.buf);
1830 >  shared->user = xstrdup(block_state.user.buf);
1831 >  shared->host = xstrdup(block_state.host.buf);
1832   };
1833  
1834   shared_items: shared_items shared_item | shared_item;
# Line 1958 | Line 1908 | shared_type_item: KLINE
1908      block_state.flags.value = SHARED_ALL;
1909   };
1910  
1911 +
1912   /***************************************************************************
1913 < *  section cluster
1913 > * cluster {} section
1914   ***************************************************************************/
1915   cluster_entry: T_CLUSTER
1916   {
# Line 1969 | Line 1920 | cluster_entry: T_CLUSTER
1920    reset_block_state();
1921  
1922    strlcpy(block_state.name.buf, "*", sizeof(block_state.name.buf));
1923 <  block_state.flags.value = SHARED_ALL;
1923 >  block_state.flags.value = CLUSTER_ALL;
1924   } '{' cluster_items '}' ';'
1925   {
1975  struct MaskItem *conf = NULL;
1976
1926    if (conf_parser_ctx.pass != 2)
1927      break;
1928  
1929 <  conf = conf_make(CONF_CLUSTER);
1930 <  conf->flags = block_state.flags.value;
1931 <  conf->name = xstrdup(block_state.name.buf);
1929 >  struct ClusterItem *cluster = cluster_make();
1930 >  cluster->type = block_state.flags.value;
1931 >  cluster->server = xstrdup(block_state.name.buf);
1932   };
1933  
1934 < cluster_items:  cluster_items cluster_item | cluster_item;
1935 < cluster_item:   cluster_name | cluster_type | error ';' ;
1934 > cluster_items:  cluster_items cluster_item | cluster_item;
1935 > cluster_item:   cluster_name | cluster_type | error ';' ;
1936  
1937   cluster_name: NAME '=' QSTRING ';'
1938   {
# Line 1997 | Line 1946 | cluster_type: TYPE
1946      block_state.flags.value = 0;
1947   } '=' cluster_types ';' ;
1948  
1949 < cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
1949 > cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
1950   cluster_type_item: KLINE
1951   {
1952    if (conf_parser_ctx.pass == 2)
1953 <    block_state.flags.value |= SHARED_KLINE;
1953 >    block_state.flags.value |= CLUSTER_KLINE;
1954   } | UNKLINE
1955   {
1956    if (conf_parser_ctx.pass == 2)
1957 <    block_state.flags.value |= SHARED_UNKLINE;
1957 >    block_state.flags.value |= CLUSTER_UNKLINE;
1958   } | T_DLINE
1959   {
1960    if (conf_parser_ctx.pass == 2)
1961 <    block_state.flags.value |= SHARED_DLINE;
1961 >    block_state.flags.value |= CLUSTER_DLINE;
1962   } | T_UNDLINE
1963   {
1964    if (conf_parser_ctx.pass == 2)
1965 <    block_state.flags.value |= SHARED_UNDLINE;
1965 >    block_state.flags.value |= CLUSTER_UNDLINE;
1966   } | XLINE
1967   {
1968    if (conf_parser_ctx.pass == 2)
1969 <    block_state.flags.value |= SHARED_XLINE;
1969 >    block_state.flags.value |= CLUSTER_XLINE;
1970   } | T_UNXLINE
1971   {
1972    if (conf_parser_ctx.pass == 2)
1973 <    block_state.flags.value |= SHARED_UNXLINE;
1973 >    block_state.flags.value |= CLUSTER_UNXLINE;
1974   } | RESV
1975   {
1976    if (conf_parser_ctx.pass == 2)
1977 <    block_state.flags.value |= SHARED_RESV;
1977 >    block_state.flags.value |= CLUSTER_RESV;
1978   } | T_UNRESV
1979   {
1980    if (conf_parser_ctx.pass == 2)
1981 <    block_state.flags.value |= SHARED_UNRESV;
1981 >    block_state.flags.value |= CLUSTER_UNRESV;
1982   } | T_LOCOPS
1983   {
1984    if (conf_parser_ctx.pass == 2)
1985 <    block_state.flags.value |= SHARED_LOCOPS;
1985 >    block_state.flags.value |= CLUSTER_LOCOPS;
1986   } | T_ALL
1987   {
1988    if (conf_parser_ctx.pass == 2)
1989 <    block_state.flags.value = SHARED_ALL;
1989 >    block_state.flags.value = CLUSTER_ALL;
1990   };
1991  
1992 +
1993   /***************************************************************************
1994 < *  section connect
1994 > * connect {}  section
1995   ***************************************************************************/
1996 < connect_entry: CONNECT  
1996 > connect_entry: CONNECT
1997   {
1998  
1999    if (conf_parser_ctx.pass != 2)
2000      break;
2001  
2002    reset_block_state();
2003 +  block_state.aftype.value = AF_INET;
2004    block_state.port.value = PORTNUM;
2005   } '{' connect_items '}' ';'
2006   {
# Line 2101 | Line 2052 | connect_entry: CONNECT
2052        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf);
2053      else
2054      {
2055 <      assert(res != NULL);
2055 >      assert(res);
2056  
2057        memcpy(&conf->bind, res->ai_addr, res->ai_addrlen);
2058        conf->bind.ss.ss_family = res->ai_family;
# Line 2115 | Line 2066 | connect_entry: CONNECT
2066   };
2067  
2068   connect_items:  connect_items connect_item | connect_item;
2069 < connect_item:   connect_name | connect_host | connect_vhost |
2070 <                connect_send_password | connect_accept_password |
2071 <                connect_ssl_certificate_fingerprint |
2072 <                connect_aftype | connect_port | connect_ssl_cipher_list |
2073 <                connect_flags | connect_hub_mask | connect_leaf_mask |
2074 <                connect_class | connect_encrypted |
2069 > connect_item:   connect_name |
2070 >                connect_host |
2071 >                connect_vhost |
2072 >                connect_send_password |
2073 >                connect_accept_password |
2074 >                connect_ssl_certificate_fingerprint |
2075 >                connect_aftype |
2076 >                connect_port |
2077 >                connect_ssl_cipher_list |
2078 >                connect_flags |
2079 >                connect_hub_mask |
2080 >                connect_leaf_mask |
2081 >                connect_class |
2082 >                connect_encrypted |
2083                  error ';' ;
2084  
2085   connect_name: NAME '=' QSTRING ';'
# Line 2129 | Line 2088 | connect_name: NAME '=' QSTRING ';'
2088      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2089   };
2090  
2091 < connect_host: HOST '=' QSTRING ';'
2091 > connect_host: HOST '=' QSTRING ';'
2092   {
2093    if (conf_parser_ctx.pass == 2)
2094      strlcpy(block_state.host.buf, yylval.string, sizeof(block_state.host.buf));
2095   };
2096  
2097 < connect_vhost: VHOST '=' QSTRING ';'
2097 > connect_vhost: VHOST '=' QSTRING ';'
2098   {
2099    if (conf_parser_ctx.pass == 2)
2100      strlcpy(block_state.bind.buf, yylval.string, sizeof(block_state.bind.buf));
2101   };
2102 <
2102 >
2103   connect_send_password: SEND_PASSWORD '=' QSTRING ';'
2104   {
2105    if (conf_parser_ctx.pass != 2)
# Line 2148 | Line 2107 | connect_send_password: SEND_PASSWORD '='
2107  
2108    if ($3[0] == ':')
2109      conf_error_report("Server passwords cannot begin with a colon");
2110 <  else if (strchr($3, ' ') != NULL)
2110 >  else if (strchr($3, ' '))
2111      conf_error_report("Server passwords cannot contain spaces");
2112    else
2113      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
# Line 2161 | Line 2120 | connect_accept_password: ACCEPT_PASSWORD
2120  
2121    if ($3[0] == ':')
2122      conf_error_report("Server passwords cannot begin with a colon");
2123 <  else if (strchr($3, ' ') != NULL)
2123 >  else if (strchr($3, ' '))
2124      conf_error_report("Server passwords cannot contain spaces");
2125    else
2126      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2185 | Line 2144 | connect_aftype: AFTYPE '=' T_IPV4 ';'
2144      block_state.aftype.value = AF_INET;
2145   } | AFTYPE '=' T_IPV6 ';'
2146   {
2188 #ifdef IPV6
2147    if (conf_parser_ctx.pass == 2)
2148      block_state.aftype.value = AF_INET6;
2191 #endif
2149   };
2150  
2151   connect_flags: IRCD_FLAGS
# Line 2218 | Line 2175 | connect_encrypted: ENCRYPTED '=' TBOOL '
2175    }
2176   };
2177  
2178 < connect_hub_mask: HUB_MASK '=' QSTRING ';'
2178 > connect_hub_mask: HUB_MASK '=' QSTRING ';'
2179   {
2180    if (conf_parser_ctx.pass == 2)
2181      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.hub.list);
2182   };
2183  
2184 < connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2184 > connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2185   {
2186    if (conf_parser_ctx.pass == 2)
2187      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.leaf.list);
# Line 2238 | Line 2195 | connect_class: CLASS '=' QSTRING ';'
2195  
2196   connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
2197   {
2198 < #ifdef HAVE_LIBCRYPTO
2198 > #ifdef HAVE_TLS
2199    if (conf_parser_ctx.pass == 2)
2200      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2201   #else
2202    if (conf_parser_ctx.pass == 2)
2203 <    conf_error_report("Ignoring connect::ciphers -- no OpenSSL support");
2203 >    conf_error_report("Ignoring connect::ciphers -- no TLS support");
2204   #endif
2205   };
2206  
2207  
2208   /***************************************************************************
2209 < *  section kill
2209 > * kill {} section
2210   ***************************************************************************/
2211   kill_entry: KILL
2212   {
# Line 2275 | Line 2232 | kill_entry: KILL
2232    else
2233      conf->reason = xstrdup(CONF_NOREASON);
2234    add_conf_by_address(CONF_KLINE, conf);
2235 < };
2235 > };
2236  
2237   kill_items:     kill_items kill_item | kill_item;
2238   kill_item:      kill_user | kill_reason | error;
# Line 2300 | Line 2257 | kill_user: USER '=' QSTRING ';'
2257    }
2258   };
2259  
2260 < kill_reason: REASON '=' QSTRING ';'
2260 > kill_reason: REASON '=' QSTRING ';'
2261   {
2262    if (conf_parser_ctx.pass == 2)
2263      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2264   };
2265  
2266 +
2267   /***************************************************************************
2268 < *  section deny
2268 > * deny {} section
2269   ***************************************************************************/
2270 < deny_entry: DENY
2270 > deny_entry: DENY
2271   {
2272    if (conf_parser_ctx.pass == 2)
2273      reset_block_state();
# Line 2334 | Line 2292 | deny_entry: DENY
2292        conf->reason = xstrdup(CONF_NOREASON);
2293      add_conf_by_address(CONF_DLINE, conf);
2294    }
2295 < };
2295 > };
2296  
2297   deny_items:     deny_items deny_item | deny_item;
2298   deny_item:      deny_ip | deny_reason | error;
# Line 2345 | Line 2303 | deny_ip: IP '=' QSTRING ';'
2303      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
2304   };
2305  
2306 < deny_reason: REASON '=' QSTRING ';'
2306 > deny_reason: REASON '=' QSTRING ';'
2307   {
2308    if (conf_parser_ctx.pass == 2)
2309      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2310   };
2311  
2312 +
2313   /***************************************************************************
2314 < *  section exempt
2314 > * exempt {} section
2315   ***************************************************************************/
2316   exempt_entry: EXEMPT '{' exempt_items '}' ';';
2317  
2318 < exempt_items:     exempt_items exempt_item | exempt_item;
2319 < exempt_item:      exempt_ip | error;
2318 > exempt_items: exempt_items exempt_item | exempt_item;
2319 > exempt_item:  exempt_ip | error;
2320  
2321   exempt_ip: IP '=' QSTRING ';'
2322   {
2323    if (conf_parser_ctx.pass == 2)
2324    {
2325 <    if (yylval.string[0] && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2325 >    if (*yylval.string && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2326      {
2327        struct MaskItem *conf = conf_make(CONF_EXEMPT);
2328        conf->host = xstrdup(yylval.string);
# Line 2374 | Line 2333 | exempt_ip: IP '=' QSTRING ';'
2333   };
2334  
2335   /***************************************************************************
2336 < *  section gecos
2336 > * gecos {} section
2337   ***************************************************************************/
2338   gecos_entry: GECOS
2339   {
# Line 2382 | Line 2341 | gecos_entry: GECOS
2341      reset_block_state();
2342   } '{' gecos_items '}' ';'
2343   {
2385  struct MaskItem *conf = NULL;
2386
2344    if (conf_parser_ctx.pass != 2)
2345      break;
2346  
2347    if (!block_state.name.buf[0])
2348      break;
2349  
2350 <  conf = conf_make(CONF_XLINE);
2351 <  conf->name = xstrdup(block_state.name.buf);
2350 >  struct GecosItem *gecos = gecos_make();
2351 >  gecos->mask = xstrdup(block_state.name.buf);
2352  
2353    if (block_state.rpass.buf[0])
2354 <    conf->reason = xstrdup(block_state.rpass.buf);
2354 >    gecos->reason = xstrdup(block_state.rpass.buf);
2355    else
2356 <    conf->reason = xstrdup(CONF_NOREASON);
2356 >    gecos->reason = xstrdup(CONF_NOREASON);
2357   };
2358  
2359   gecos_items: gecos_items gecos_item | gecos_item;
2360   gecos_item:  gecos_name | gecos_reason | error;
2361  
2362 < gecos_name: NAME '=' QSTRING ';'
2362 > gecos_name: NAME '=' QSTRING ';'
2363   {
2364    if (conf_parser_ctx.pass == 2)
2365      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2366   };
2367  
2368 < gecos_reason: REASON '=' QSTRING ';'
2368 > gecos_reason: REASON '=' QSTRING ';'
2369   {
2370    if (conf_parser_ctx.pass == 2)
2371      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2372   };
2373  
2374 +
2375   /***************************************************************************
2376 < *  section general
2376 > * general {} section
2377   ***************************************************************************/
2378 < general_entry: GENERAL
2421 <  '{' general_items '}' ';';
2378 > general_entry: GENERAL '{' general_items '}' ';';
2379  
2380   general_items:      general_items general_item | general_item;
2381 < general_item:       general_hide_spoof_ips | general_ignore_bogus_ts |
2382 <                    general_failed_oper_notice | general_anti_nick_flood |
2383 <                    general_max_nick_time | general_max_nick_changes |
2384 <                    general_max_accept | general_anti_spam_exit_message_time |
2385 <                    general_ts_warn_delta | general_ts_max_delta |
2381 > general_item:       general_away_count |
2382 >                    general_away_time |
2383 >                    general_ignore_bogus_ts |
2384 >                    general_failed_oper_notice |
2385 >                    general_anti_nick_flood |
2386 >                    general_max_nick_time |
2387 >                    general_max_nick_changes |
2388 >                    general_max_accept |
2389 >                    general_whowas_history_length |
2390 >                    general_anti_spam_exit_message_time |
2391 >                    general_ts_warn_delta |
2392 >                    general_ts_max_delta |
2393                      general_kill_chase_time_limit |
2394                      general_invisible_on_connect |
2395 <                    general_warn_no_nline | general_dots_in_ident |
2396 <                    general_stats_o_oper_only | general_stats_k_oper_only |
2397 <                    general_pace_wait | general_stats_i_oper_only |
2398 <                    general_pace_wait_simple | general_stats_P_oper_only |
2395 >                    general_warn_no_connect_block |
2396 >                    general_dots_in_ident |
2397 >                    general_stats_i_oper_only |
2398 >                    general_stats_k_oper_only |
2399 >                    general_stats_m_oper_only |
2400 >                    general_stats_o_oper_only |
2401 >                    general_stats_P_oper_only |
2402                      general_stats_u_oper_only |
2403 <                    general_short_motd | general_no_oper_flood |
2404 <                    general_true_no_oper_flood | general_oper_pass_resv |
2405 <                    general_oper_only_umodes | general_max_targets |
2406 <                    general_use_egd | general_egdpool_path |
2407 <                    general_oper_umodes | general_caller_id_wait |
2408 <                    general_opers_bypass_callerid | general_default_floodcount |
2409 <                    general_min_nonwildcard | general_min_nonwildcard_simple |
2410 <                    general_throttle_time | general_havent_read_conf |
2403 >                    general_pace_wait |
2404 >                    general_pace_wait_simple |
2405 >                    general_short_motd |
2406 >                    general_no_oper_flood |
2407 >                    general_oper_only_umodes |
2408 >                    general_max_targets |
2409 >                    general_oper_umodes |
2410 >                    general_caller_id_wait |
2411 >                    general_opers_bypass_callerid |
2412 >                    general_default_floodcount |
2413 >                    general_default_floodtime |
2414 >                    general_min_nonwildcard |
2415 >                    general_min_nonwildcard_simple |
2416 >                    general_throttle_count |
2417 >                    general_throttle_time |
2418                      general_ping_cookie |
2419 <                    general_disable_auth |
2420 <                    general_tkline_expire_notices | general_gline_enable |
2421 <                    general_gline_duration | general_gline_request_duration |
2422 <                    general_gline_min_cidr |
2423 <                    general_gline_min_cidr6 |
2424 <                    general_stats_e_disabled |
2425 <                    general_max_watch | general_services_name |
2426 <                    general_cycle_on_host_change |
2427 <                    error;
2419 >                    general_disable_auth |
2420 >                    general_tkline_expire_notices |
2421 >                    general_dline_min_cidr |
2422 >                    general_dline_min_cidr6 |
2423 >                    general_kline_min_cidr |
2424 >                    general_kline_min_cidr6 |
2425 >                    general_stats_e_disabled |
2426 >                    general_max_watch |
2427 >                    general_cycle_on_host_change |
2428 >                    error;
2429  
2430  
2431 < general_max_watch: MAX_WATCH '=' NUMBER ';'
2431 > general_away_count: AWAY_COUNT '=' NUMBER ';'
2432   {
2433 <  ConfigFileEntry.max_watch = $3;
2433 >  ConfigGeneral.away_count = $3;
2434   };
2435  
2436 < general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2436 > general_away_time: AWAY_TIME '=' timespec ';'
2437   {
2438 <  if (conf_parser_ctx.pass == 2)
2464 <    ConfigFileEntry.cycle_on_host_change = yylval.number;
2438 >  ConfigGeneral.away_time = $3;
2439   };
2440  
2441 < general_gline_enable: GLINE_ENABLE '=' TBOOL ';'
2441 > general_max_watch: MAX_WATCH '=' NUMBER ';'
2442   {
2443 <  if (conf_parser_ctx.pass == 2)
2470 <    ConfigFileEntry.glines = yylval.number;
2443 >  ConfigGeneral.max_watch = $3;
2444   };
2445  
2446 < general_gline_duration: GLINE_DURATION '=' timespec ';'
2446 > general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';'
2447   {
2448 <  if (conf_parser_ctx.pass == 2)
2476 <    ConfigFileEntry.gline_time = $3;
2448 >  ConfigGeneral.whowas_history_length = $3;
2449   };
2450  
2451 < general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';'
2451 > general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2452   {
2453    if (conf_parser_ctx.pass == 2)
2454 <    ConfigFileEntry.gline_request_time = $3;
2454 >    ConfigGeneral.cycle_on_host_change = yylval.number;
2455   };
2456  
2457 < general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';'
2457 > general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';'
2458   {
2459 <  ConfigFileEntry.gline_min_cidr = $3;
2459 >  ConfigGeneral.dline_min_cidr = $3;
2460   };
2461  
2462 < general_gline_min_cidr6: GLINE_MIN_CIDR6 '=' NUMBER ';'
2462 > general_dline_min_cidr6: DLINE_MIN_CIDR6 '=' NUMBER ';'
2463   {
2464 <  ConfigFileEntry.gline_min_cidr6 = $3;
2464 >  ConfigGeneral.dline_min_cidr6 = $3;
2465   };
2466  
2467 < general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2467 > general_kline_min_cidr: KLINE_MIN_CIDR '=' NUMBER ';'
2468   {
2469 <  ConfigFileEntry.tkline_expire_notices = yylval.number;
2469 >  ConfigGeneral.kline_min_cidr = $3;
2470   };
2471  
2472 < general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2472 > general_kline_min_cidr6: KLINE_MIN_CIDR6 '=' NUMBER ';'
2473   {
2474 <  ConfigFileEntry.kill_chase_time_limit = $3;
2474 >  ConfigGeneral.kline_min_cidr6 = $3;
2475   };
2476  
2477 < general_hide_spoof_ips: HIDE_SPOOF_IPS '=' TBOOL ';'
2477 > general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2478   {
2479 <  ConfigFileEntry.hide_spoof_ips = yylval.number;
2479 >  ConfigGeneral.tkline_expire_notices = yylval.number;
2480 > };
2481 >
2482 > general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2483 > {
2484 >  ConfigGeneral.kill_chase_time_limit = $3;
2485   };
2486  
2487   general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';'
2488   {
2489 <  ConfigFileEntry.ignore_bogus_ts = yylval.number;
2489 >  ConfigGeneral.ignore_bogus_ts = yylval.number;
2490   };
2491  
2492   general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';'
2493   {
2494 <  ConfigFileEntry.failed_oper_notice = yylval.number;
2494 >  ConfigGeneral.failed_oper_notice = yylval.number;
2495   };
2496  
2497   general_anti_nick_flood: ANTI_NICK_FLOOD '=' TBOOL ';'
2498   {
2499 <  ConfigFileEntry.anti_nick_flood = yylval.number;
2499 >  ConfigGeneral.anti_nick_flood = yylval.number;
2500   };
2501  
2502   general_max_nick_time: MAX_NICK_TIME '=' timespec ';'
2503   {
2504 <  ConfigFileEntry.max_nick_time = $3;
2504 >  ConfigGeneral.max_nick_time = $3;
2505   };
2506  
2507   general_max_nick_changes: MAX_NICK_CHANGES '=' NUMBER ';'
2508   {
2509 <  ConfigFileEntry.max_nick_changes = $3;
2509 >  ConfigGeneral.max_nick_changes = $3;
2510   };
2511  
2512   general_max_accept: MAX_ACCEPT '=' NUMBER ';'
2513   {
2514 <  ConfigFileEntry.max_accept = $3;
2514 >  ConfigGeneral.max_accept = $3;
2515   };
2516  
2517   general_anti_spam_exit_message_time: ANTI_SPAM_EXIT_MESSAGE_TIME '=' timespec ';'
2518   {
2519 <  ConfigFileEntry.anti_spam_exit_message_time = $3;
2519 >  ConfigGeneral.anti_spam_exit_message_time = $3;
2520   };
2521  
2522   general_ts_warn_delta: TS_WARN_DELTA '=' timespec ';'
2523   {
2524 <  ConfigFileEntry.ts_warn_delta = $3;
2524 >  ConfigGeneral.ts_warn_delta = $3;
2525   };
2526  
2527   general_ts_max_delta: TS_MAX_DELTA '=' timespec ';'
2528   {
2529    if (conf_parser_ctx.pass == 2)
2530 <    ConfigFileEntry.ts_max_delta = $3;
2530 >    ConfigGeneral.ts_max_delta = $3;
2531   };
2532  
2533 < general_havent_read_conf: HAVENT_READ_CONF '=' NUMBER ';'
2533 > general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2534   {
2535 <  if (($3 > 0) && conf_parser_ctx.pass == 1)
2559 <  {
2560 <    ilog(LOG_TYPE_IRCD, "You haven't read your config file properly.");
2561 <    ilog(LOG_TYPE_IRCD, "There is a line in the example conf that will kill your server if not removed.");
2562 <    ilog(LOG_TYPE_IRCD, "Consider actually reading/editing the conf file, and removing this line.");
2563 <    exit(0);
2564 <  }
2535 >  ConfigGeneral.invisible_on_connect = yylval.number;
2536   };
2537  
2538 < general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2538 > general_warn_no_connect_block: WARN_NO_CONNECT_BLOCK '=' TBOOL ';'
2539   {
2540 <  ConfigFileEntry.invisible_on_connect = yylval.number;
2540 >  ConfigGeneral.warn_no_connect_block = yylval.number;
2541   };
2542  
2543 < general_warn_no_nline: WARN_NO_NLINE '=' TBOOL ';'
2543 > general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2544   {
2545 <  ConfigFileEntry.warn_no_nline = yylval.number;
2545 >  ConfigGeneral.stats_e_disabled = yylval.number;
2546   };
2547  
2548 < general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2548 > general_stats_m_oper_only: STATS_M_OPER_ONLY '=' TBOOL ';'
2549   {
2550 <  ConfigFileEntry.stats_e_disabled = yylval.number;
2550 >  ConfigGeneral.stats_m_oper_only = yylval.number;
2551   };
2552  
2553   general_stats_o_oper_only: STATS_O_OPER_ONLY '=' TBOOL ';'
2554   {
2555 <  ConfigFileEntry.stats_o_oper_only = yylval.number;
2555 >  ConfigGeneral.stats_o_oper_only = yylval.number;
2556   };
2557  
2558   general_stats_P_oper_only: STATS_P_OPER_ONLY '=' TBOOL ';'
2559   {
2560 <  ConfigFileEntry.stats_P_oper_only = yylval.number;
2560 >  ConfigGeneral.stats_P_oper_only = yylval.number;
2561   };
2562  
2563   general_stats_u_oper_only: STATS_U_OPER_ONLY '=' TBOOL ';'
2564   {
2565 <  ConfigFileEntry.stats_u_oper_only = yylval.number;
2565 >  ConfigGeneral.stats_u_oper_only = yylval.number;
2566   };
2567  
2568   general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';'
2569   {
2570 <  ConfigFileEntry.stats_k_oper_only = 2 * yylval.number;
2570 >  ConfigGeneral.stats_k_oper_only = 2 * yylval.number;
2571   } | STATS_K_OPER_ONLY '=' TMASKED ';'
2572   {
2573 <  ConfigFileEntry.stats_k_oper_only = 1;
2573 >  ConfigGeneral.stats_k_oper_only = 1;
2574   };
2575  
2576   general_stats_i_oper_only: STATS_I_OPER_ONLY '=' TBOOL ';'
2577   {
2578 <  ConfigFileEntry.stats_i_oper_only = 2 * yylval.number;
2578 >  ConfigGeneral.stats_i_oper_only = 2 * yylval.number;
2579   } | STATS_I_OPER_ONLY '=' TMASKED ';'
2580   {
2581 <  ConfigFileEntry.stats_i_oper_only = 1;
2581 >  ConfigGeneral.stats_i_oper_only = 1;
2582   };
2583  
2584   general_pace_wait: PACE_WAIT '=' timespec ';'
2585   {
2586 <  ConfigFileEntry.pace_wait = $3;
2586 >  ConfigGeneral.pace_wait = $3;
2587   };
2588  
2589   general_caller_id_wait: CALLER_ID_WAIT '=' timespec ';'
2590   {
2591 <  ConfigFileEntry.caller_id_wait = $3;
2591 >  ConfigGeneral.caller_id_wait = $3;
2592   };
2593  
2594   general_opers_bypass_callerid: OPERS_BYPASS_CALLERID '=' TBOOL ';'
2595   {
2596 <  ConfigFileEntry.opers_bypass_callerid = yylval.number;
2596 >  ConfigGeneral.opers_bypass_callerid = yylval.number;
2597   };
2598  
2599   general_pace_wait_simple: PACE_WAIT_SIMPLE '=' timespec ';'
2600   {
2601 <  ConfigFileEntry.pace_wait_simple = $3;
2601 >  ConfigGeneral.pace_wait_simple = $3;
2602   };
2603  
2604   general_short_motd: SHORT_MOTD '=' TBOOL ';'
2605   {
2606 <  ConfigFileEntry.short_motd = yylval.number;
2636 < };
2637 <  
2638 < general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2639 < {
2640 <  ConfigFileEntry.no_oper_flood = yylval.number;
2606 >  ConfigGeneral.short_motd = yylval.number;
2607   };
2608  
2609 < general_true_no_oper_flood: TRUE_NO_OPER_FLOOD '=' TBOOL ';'
2644 < {
2645 <  ConfigFileEntry.true_no_oper_flood = yylval.number;
2646 < };
2647 <
2648 < general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';'
2609 > general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2610   {
2611 <  ConfigFileEntry.oper_pass_resv = yylval.number;
2611 >  ConfigGeneral.no_oper_flood = yylval.number;
2612   };
2613  
2614   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2615   {
2616 <  ConfigFileEntry.dots_in_ident = $3;
2616 >  ConfigGeneral.dots_in_ident = $3;
2617   };
2618  
2619   general_max_targets: MAX_TARGETS '=' NUMBER ';'
2620   {
2621 <  ConfigFileEntry.max_targets = $3;
2621 >  ConfigGeneral.max_targets = $3;
2622   };
2623  
2624 < general_use_egd: USE_EGD '=' TBOOL ';'
2624 > general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2625   {
2626 <  ConfigFileEntry.use_egd = yylval.number;
2626 >  ConfigGeneral.ping_cookie = yylval.number;
2627   };
2628  
2629 < general_egdpool_path: EGDPOOL_PATH '=' QSTRING ';'
2669 < {
2670 <  if (conf_parser_ctx.pass == 2)
2671 <  {
2672 <    MyFree(ConfigFileEntry.egdpool_path);
2673 <    ConfigFileEntry.egdpool_path = xstrdup(yylval.string);
2674 <  }
2675 < };
2676 <
2677 < general_services_name: T_SERVICES_NAME '=' QSTRING ';'
2678 < {
2679 <  if (conf_parser_ctx.pass == 2 && valid_servname(yylval.string))
2680 <  {
2681 <    MyFree(ConfigFileEntry.service_name);
2682 <    ConfigFileEntry.service_name = xstrdup(yylval.string);
2683 <  }
2684 < };
2685 <
2686 < general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2629 > general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2630   {
2631 <  ConfigFileEntry.ping_cookie = yylval.number;
2631 >  ConfigGeneral.disable_auth = yylval.number;
2632   };
2633  
2634 < general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2634 > general_throttle_count: THROTTLE_COUNT '=' NUMBER ';'
2635   {
2636 <  ConfigFileEntry.disable_auth = yylval.number;
2636 >  ConfigGeneral.throttle_count = $3;
2637   };
2638  
2639   general_throttle_time: THROTTLE_TIME '=' timespec ';'
2640   {
2641 <  ConfigFileEntry.throttle_time = yylval.number;
2641 >  ConfigGeneral.throttle_time = $3;
2642   };
2643  
2644   general_oper_umodes: OPER_UMODES
2645   {
2646 <  ConfigFileEntry.oper_umodes = 0;
2646 >  ConfigGeneral.oper_umodes = 0;
2647   } '='  umode_oitems ';' ;
2648  
2649   umode_oitems:    umode_oitems ',' umode_oitem | umode_oitem;
2650   umode_oitem:     T_BOTS
2651   {
2652 <  ConfigFileEntry.oper_umodes |= UMODE_BOTS;
2652 >  ConfigGeneral.oper_umodes |= UMODE_BOTS;
2653   } | T_CCONN
2654   {
2655 <  ConfigFileEntry.oper_umodes |= UMODE_CCONN;
2655 >  ConfigGeneral.oper_umodes |= UMODE_CCONN;
2656   } | T_DEAF
2657   {
2658 <  ConfigFileEntry.oper_umodes |= UMODE_DEAF;
2658 >  ConfigGeneral.oper_umodes |= UMODE_DEAF;
2659   } | T_DEBUG
2660   {
2661 <  ConfigFileEntry.oper_umodes |= UMODE_DEBUG;
2661 >  ConfigGeneral.oper_umodes |= UMODE_DEBUG;
2662   } | T_FULL
2663   {
2664 <  ConfigFileEntry.oper_umodes |= UMODE_FULL;
2664 >  ConfigGeneral.oper_umodes |= UMODE_FULL;
2665   } | HIDDEN
2666   {
2667 <  ConfigFileEntry.oper_umodes |= UMODE_HIDDEN;
2667 >  ConfigGeneral.oper_umodes |= UMODE_HIDDEN;
2668 > } | HIDE_CHANS
2669 > {
2670 >  ConfigGeneral.oper_umodes |= UMODE_HIDECHANS;
2671 > } | HIDE_IDLE
2672 > {
2673 >  ConfigGeneral.oper_umodes |= UMODE_HIDEIDLE;
2674   } | T_SKILL
2675   {
2676 <  ConfigFileEntry.oper_umodes |= UMODE_SKILL;
2676 >  ConfigGeneral.oper_umodes |= UMODE_SKILL;
2677   } | T_NCHANGE
2678   {
2679 <  ConfigFileEntry.oper_umodes |= UMODE_NCHANGE;
2679 >  ConfigGeneral.oper_umodes |= UMODE_NCHANGE;
2680   } | T_REJ
2681   {
2682 <  ConfigFileEntry.oper_umodes |= UMODE_REJ;
2682 >  ConfigGeneral.oper_umodes |= UMODE_REJ;
2683   } | T_UNAUTH
2684   {
2685 <  ConfigFileEntry.oper_umodes |= UMODE_UNAUTH;
2685 >  ConfigGeneral.oper_umodes |= UMODE_UNAUTH;
2686   } | T_SPY
2687   {
2688 <  ConfigFileEntry.oper_umodes |= UMODE_SPY;
2688 >  ConfigGeneral.oper_umodes |= UMODE_SPY;
2689   } | T_EXTERNAL
2690   {
2691 <  ConfigFileEntry.oper_umodes |= UMODE_EXTERNAL;
2743 < } | T_OPERWALL
2744 < {
2745 <  ConfigFileEntry.oper_umodes |= UMODE_OPERWALL;
2691 >  ConfigGeneral.oper_umodes |= UMODE_EXTERNAL;
2692   } | T_SERVNOTICE
2693   {
2694 <  ConfigFileEntry.oper_umodes |= UMODE_SERVNOTICE;
2694 >  ConfigGeneral.oper_umodes |= UMODE_SERVNOTICE;
2695   } | T_INVISIBLE
2696   {
2697 <  ConfigFileEntry.oper_umodes |= UMODE_INVISIBLE;
2697 >  ConfigGeneral.oper_umodes |= UMODE_INVISIBLE;
2698   } | T_WALLOP
2699   {
2700 <  ConfigFileEntry.oper_umodes |= UMODE_WALLOP;
2700 >  ConfigGeneral.oper_umodes |= UMODE_WALLOP;
2701   } | T_SOFTCALLERID
2702   {
2703 <  ConfigFileEntry.oper_umodes |= UMODE_SOFTCALLERID;
2703 >  ConfigGeneral.oper_umodes |= UMODE_SOFTCALLERID;
2704   } | T_CALLERID
2705   {
2706 <  ConfigFileEntry.oper_umodes |= UMODE_CALLERID;
2706 >  ConfigGeneral.oper_umodes |= UMODE_CALLERID;
2707   } | T_LOCOPS
2708   {
2709 <  ConfigFileEntry.oper_umodes |= UMODE_LOCOPS;
2709 >  ConfigGeneral.oper_umodes |= UMODE_LOCOPS;
2710   } | T_NONONREG
2711   {
2712 <  ConfigFileEntry.oper_umodes |= UMODE_REGONLY;
2712 >  ConfigGeneral.oper_umodes |= UMODE_REGONLY;
2713   } | T_FARCONNECT
2714   {
2715 <  ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT;
2715 >  ConfigGeneral.oper_umodes |= UMODE_FARCONNECT;
2716   };
2717  
2718 < general_oper_only_umodes: OPER_ONLY_UMODES
2718 > general_oper_only_umodes: OPER_ONLY_UMODES
2719   {
2720 <  ConfigFileEntry.oper_only_umodes = 0;
2720 >  ConfigGeneral.oper_only_umodes = 0;
2721   } '='  umode_items ';' ;
2722  
2723 < umode_items:    umode_items ',' umode_item | umode_item;
2724 < umode_item:     T_BOTS
2723 > umode_items:  umode_items ',' umode_item | umode_item;
2724 > umode_item:   T_BOTS
2725   {
2726 <  ConfigFileEntry.oper_only_umodes |= UMODE_BOTS;
2726 >  ConfigGeneral.oper_only_umodes |= UMODE_BOTS;
2727   } | T_CCONN
2728   {
2729 <  ConfigFileEntry.oper_only_umodes |= UMODE_CCONN;
2729 >  ConfigGeneral.oper_only_umodes |= UMODE_CCONN;
2730   } | T_DEAF
2731   {
2732 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEAF;
2732 >  ConfigGeneral.oper_only_umodes |= UMODE_DEAF;
2733   } | T_DEBUG
2734   {
2735 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEBUG;
2735 >  ConfigGeneral.oper_only_umodes |= UMODE_DEBUG;
2736   } | T_FULL
2737 < {
2738 <  ConfigFileEntry.oper_only_umodes |= UMODE_FULL;
2737 > {
2738 >  ConfigGeneral.oper_only_umodes |= UMODE_FULL;
2739   } | T_SKILL
2740   {
2741 <  ConfigFileEntry.oper_only_umodes |= UMODE_SKILL;
2741 >  ConfigGeneral.oper_only_umodes |= UMODE_SKILL;
2742   } | HIDDEN
2743   {
2744 <  ConfigFileEntry.oper_only_umodes |= UMODE_HIDDEN;
2744 >  ConfigGeneral.oper_only_umodes |= UMODE_HIDDEN;
2745   } | T_NCHANGE
2746   {
2747 <  ConfigFileEntry.oper_only_umodes |= UMODE_NCHANGE;
2747 >  ConfigGeneral.oper_only_umodes |= UMODE_NCHANGE;
2748   } | T_REJ
2749   {
2750 <  ConfigFileEntry.oper_only_umodes |= UMODE_REJ;
2750 >  ConfigGeneral.oper_only_umodes |= UMODE_REJ;
2751   } | T_UNAUTH
2752   {
2753 <  ConfigFileEntry.oper_only_umodes |= UMODE_UNAUTH;
2753 >  ConfigGeneral.oper_only_umodes |= UMODE_UNAUTH;
2754   } | T_SPY
2755   {
2756 <  ConfigFileEntry.oper_only_umodes |= UMODE_SPY;
2756 >  ConfigGeneral.oper_only_umodes |= UMODE_SPY;
2757   } | T_EXTERNAL
2758   {
2759 <  ConfigFileEntry.oper_only_umodes |= UMODE_EXTERNAL;
2814 < } | T_OPERWALL
2815 < {
2816 <  ConfigFileEntry.oper_only_umodes |= UMODE_OPERWALL;
2759 >  ConfigGeneral.oper_only_umodes |= UMODE_EXTERNAL;
2760   } | T_SERVNOTICE
2761   {
2762 <  ConfigFileEntry.oper_only_umodes |= UMODE_SERVNOTICE;
2762 >  ConfigGeneral.oper_only_umodes |= UMODE_SERVNOTICE;
2763   } | T_INVISIBLE
2764   {
2765 <  ConfigFileEntry.oper_only_umodes |= UMODE_INVISIBLE;
2765 >  ConfigGeneral.oper_only_umodes |= UMODE_INVISIBLE;
2766   } | T_WALLOP
2767   {
2768 <  ConfigFileEntry.oper_only_umodes |= UMODE_WALLOP;
2768 >  ConfigGeneral.oper_only_umodes |= UMODE_WALLOP;
2769   } | T_SOFTCALLERID
2770   {
2771 <  ConfigFileEntry.oper_only_umodes |= UMODE_SOFTCALLERID;
2771 >  ConfigGeneral.oper_only_umodes |= UMODE_SOFTCALLERID;
2772   } | T_CALLERID
2773   {
2774 <  ConfigFileEntry.oper_only_umodes |= UMODE_CALLERID;
2774 >  ConfigGeneral.oper_only_umodes |= UMODE_CALLERID;
2775   } | T_LOCOPS
2776   {
2777 <  ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS;
2777 >  ConfigGeneral.oper_only_umodes |= UMODE_LOCOPS;
2778   } | T_NONONREG
2779   {
2780 <  ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
2780 >  ConfigGeneral.oper_only_umodes |= UMODE_REGONLY;
2781   } | T_FARCONNECT
2782   {
2783 <  ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT;
2783 >  ConfigGeneral.oper_only_umodes |= UMODE_FARCONNECT;
2784   };
2785  
2786   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
2787   {
2788 <  ConfigFileEntry.min_nonwildcard = $3;
2788 >  ConfigGeneral.min_nonwildcard = $3;
2789   };
2790  
2791   general_min_nonwildcard_simple: MIN_NONWILDCARD_SIMPLE '=' NUMBER ';'
2792   {
2793 <  ConfigFileEntry.min_nonwildcard_simple = $3;
2793 >  ConfigGeneral.min_nonwildcard_simple = $3;
2794   };
2795  
2796   general_default_floodcount: DEFAULT_FLOODCOUNT '=' NUMBER ';'
2797   {
2798 <  ConfigFileEntry.default_floodcount = $3;
2798 >  ConfigGeneral.default_floodcount = $3;
2799 > };
2800 >
2801 > general_default_floodtime: DEFAULT_FLOODTIME '=' timespec ';'
2802 > {
2803 >  ConfigGeneral.default_floodtime = $3;
2804   };
2805  
2806  
2807   /***************************************************************************
2808 < *  section channel
2808 > * channel {} section
2809   ***************************************************************************/
2810 < channel_entry: CHANNEL
2863 <  '{' channel_items '}' ';';
2810 > channel_entry: CHANNEL '{' channel_items '}' ';';
2811  
2812   channel_items:      channel_items channel_item | channel_item;
2813   channel_item:       channel_max_bans |
2814 <                    channel_knock_delay | channel_knock_delay_channel |
2815 <                    channel_max_chans_per_user | channel_max_chans_per_oper |
2816 <                    channel_default_split_user_count |
2817 <                    channel_default_split_server_count |
2818 <                    channel_no_create_on_split |
2819 <                    channel_no_join_on_split |
2820 <                    channel_jflood_count | channel_jflood_time |
2821 <                    channel_disable_fake_channels | error;
2814 >                    channel_max_bans_large |
2815 >                    channel_invite_client_count |
2816 >                    channel_invite_client_time |
2817 >                    channel_invite_delay_channel |
2818 >                    channel_invite_expire_time |
2819 >                    channel_knock_client_count |
2820 >                    channel_knock_client_time |
2821 >                    channel_knock_delay_channel |
2822 >                    channel_max_channels |
2823 >                    channel_max_invites |
2824 >                    channel_default_join_flood_count |
2825 >                    channel_default_join_flood_time |
2826 >                    channel_disable_fake_channels |
2827 >                    error;
2828  
2829   channel_disable_fake_channels: DISABLE_FAKE_CHANNELS '=' TBOOL ';'
2830   {
2831    ConfigChannel.disable_fake_channels = yylval.number;
2832   };
2833  
2834 < channel_knock_delay: KNOCK_DELAY '=' timespec ';'
2834 > channel_invite_client_count: INVITE_CLIENT_COUNT '=' NUMBER ';'
2835   {
2836 <  ConfigChannel.knock_delay = $3;
2836 >  ConfigChannel.invite_client_count = $3;
2837   };
2838  
2839 < channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2839 > channel_invite_client_time: INVITE_CLIENT_TIME '=' timespec ';'
2840   {
2841 <  ConfigChannel.knock_delay_channel = $3;
2841 >  ConfigChannel.invite_client_time = $3;
2842   };
2843  
2844 < channel_max_chans_per_user: MAX_CHANS_PER_USER '=' NUMBER ';'
2844 > channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';'
2845   {
2846 <  ConfigChannel.max_chans_per_user = $3;
2846 >  ConfigChannel.invite_delay_channel = $3;
2847   };
2848  
2849 < channel_max_chans_per_oper: MAX_CHANS_PER_OPER '=' NUMBER ';'
2849 > channel_invite_expire_time: INVITE_EXPIRE_TIME '=' timespec ';'
2850   {
2851 <  ConfigChannel.max_chans_per_oper = $3;
2851 >  ConfigChannel.invite_expire_time = $3;
2852   };
2853  
2854 < channel_max_bans: MAX_BANS '=' NUMBER ';'
2854 > channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2855   {
2856 <  ConfigChannel.max_bans = $3;
2856 >  ConfigChannel.knock_client_count = $3;
2857 > };
2858 >
2859 > channel_knock_client_time: KNOCK_CLIENT_TIME '=' timespec ';'
2860 > {
2861 >  ConfigChannel.knock_client_time = $3;
2862 > };
2863 >
2864 > channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2865 > {
2866 >  ConfigChannel.knock_delay_channel = $3;
2867   };
2868  
2869 < channel_default_split_user_count: DEFAULT_SPLIT_USER_COUNT '=' NUMBER ';'
2869 > channel_max_channels: MAX_CHANNELS '=' NUMBER ';'
2870   {
2871 <  ConfigChannel.default_split_user_count = $3;
2871 >  ConfigChannel.max_channels = $3;
2872   };
2873  
2874 < channel_default_split_server_count: DEFAULT_SPLIT_SERVER_COUNT '=' NUMBER ';'
2874 > channel_max_invites: MAX_INVITES '=' NUMBER ';'
2875   {
2876 <  ConfigChannel.default_split_server_count = $3;
2876 >  ConfigChannel.max_invites = $3;
2877   };
2878  
2879 < channel_no_create_on_split: NO_CREATE_ON_SPLIT '=' TBOOL ';'
2879 > channel_max_bans: MAX_BANS '=' NUMBER ';'
2880   {
2881 <  ConfigChannel.no_create_on_split = yylval.number;
2881 >  ConfigChannel.max_bans = $3;
2882   };
2883  
2884 < channel_no_join_on_split: NO_JOIN_ON_SPLIT '=' TBOOL ';'
2884 > channel_max_bans_large: MAX_BANS_LARGE '=' NUMBER ';'
2885   {
2886 <  ConfigChannel.no_join_on_split = yylval.number;
2886 >  ConfigChannel.max_bans_large = $3;
2887   };
2888  
2889 < channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';'
2889 > channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';'
2890   {
2891 <  GlobalSetOptions.joinfloodcount = yylval.number;
2891 >  ConfigChannel.default_join_flood_count = yylval.number;
2892   };
2893  
2894 < channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';'
2894 > channel_default_join_flood_time: DEFAULT_JOIN_FLOOD_TIME '=' timespec ';'
2895   {
2896 <  GlobalSetOptions.joinfloodtime = yylval.number;
2896 >  ConfigChannel.default_join_flood_time = $3;
2897   };
2898  
2899 +
2900   /***************************************************************************
2901 < *  section serverhide
2901 > * serverhide {} section
2902   ***************************************************************************/
2903 < serverhide_entry: SERVERHIDE
2940 <  '{' serverhide_items '}' ';';
2903 > serverhide_entry: SERVERHIDE '{' serverhide_items '}' ';';
2904  
2905   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
2906 < serverhide_item:    serverhide_flatten_links | serverhide_disable_remote_commands |
2906 > serverhide_item:    serverhide_flatten_links |
2907 >                    serverhide_flatten_links_delay |
2908 >                    serverhide_flatten_links_file |
2909 >                    serverhide_disable_remote_commands |
2910                      serverhide_hide_servers |
2911 <                    serverhide_hide_services |
2912 <                    serverhide_links_delay |
2913 <                    serverhide_hidden | serverhide_hidden_name |
2914 <                    serverhide_hide_server_ips |
2911 >                    serverhide_hide_services |
2912 >                    serverhide_hidden |
2913 >                    serverhide_hidden_name |
2914 >                    serverhide_hide_server_ips |
2915                      error;
2916  
2917   serverhide_flatten_links: FLATTEN_LINKS '=' TBOOL ';'
# Line 2954 | Line 2920 | serverhide_flatten_links: FLATTEN_LINKS
2920      ConfigServerHide.flatten_links = yylval.number;
2921   };
2922  
2923 + serverhide_flatten_links_delay: FLATTEN_LINKS_DELAY '=' timespec ';'
2924 + {
2925 +  if (conf_parser_ctx.pass == 2)
2926 +  {
2927 +    if ($3 > 0)
2928 +    {
2929 +      event_write_links_file.when = $3;
2930 +      event_add(&event_write_links_file, NULL);
2931 +    }
2932 +    else
2933 +     event_delete(&event_write_links_file);
2934 +
2935 +    ConfigServerHide.flatten_links_delay = $3;
2936 +  }
2937 + };
2938 +
2939 + serverhide_flatten_links_file: FLATTEN_LINKS_FILE '=' QSTRING ';'
2940 + {
2941 +  if (conf_parser_ctx.pass == 2)
2942 +  {
2943 +    xfree(ConfigServerHide.flatten_links_file);
2944 +    ConfigServerHide.flatten_links_file = xstrdup(yylval.string);
2945 +  }
2946 + };
2947 +
2948   serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';'
2949   {
2950    if (conf_parser_ctx.pass == 2)
# Line 2976 | Line 2967 | serverhide_hidden_name: HIDDEN_NAME '='
2967   {
2968    if (conf_parser_ctx.pass == 2)
2969    {
2970 <    MyFree(ConfigServerHide.hidden_name);
2970 >    xfree(ConfigServerHide.hidden_name);
2971      ConfigServerHide.hidden_name = xstrdup(yylval.string);
2972    }
2973   };
2974  
2984 serverhide_links_delay: LINKS_DELAY '=' timespec ';'
2985 {
2986  if (conf_parser_ctx.pass == 2)
2987  {
2988    if (($3 > 0) && ConfigServerHide.links_disabled == 1)
2989    {
2990      eventAddIsh("write_links_file", write_links_file, NULL, $3);
2991      ConfigServerHide.links_disabled = 0;
2992    }
2993
2994    ConfigServerHide.links_delay = $3;
2995  }
2996 };
2997
2975   serverhide_hidden: HIDDEN '=' TBOOL ';'
2976   {
2977    if (conf_parser_ctx.pass == 2)

Comparing ircd-hybrid/trunk/src/conf_parser.y (property svn:keywords):
Revision 2336 by michael, Wed Jul 3 12:58:28 2013 UTC vs.
Revision 8752 by michael, Tue Jan 1 11:07:01 2019 UTC

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

Diff Legend

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