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 2252 by michael, Sun Jun 16 13:29:13 2013 UTC vs.
Revision 7437 by michael, Thu Mar 10 19:59:52 2016 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-2016 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"
# Line 34 | Line 33
33   #include "list.h"
34   #include "conf.h"
35   #include "conf_class.h"
36 + #include "conf_cluster.h"
37 + #include "conf_gecos.h"
38 + #include "conf_pseudo.h"
39 + #include "conf_resv.h"
40 + #include "conf_service.h"
41 + #include "conf_shared.h"
42   #include "event.h"
43 + #include "id.h"
44   #include "log.h"
39 #include "client.h"     /* for UMODE_ALL only */
45   #include "irc_string.h"
46   #include "memory.h"
47   #include "modules.h"
48 < #include "s_serv.h"
48 > #include "server.h"
49   #include "hostmask.h"
45 #include "send.h"
50   #include "listener.h"
51 < #include "resv.h"
48 < #include "numeric.h"
49 < #include "s_user.h"
51 > #include "user.h"
52   #include "motd.h"
53  
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
54   int yylex(void);
55  
56   static struct
57   {
58 <  struct {
58 >  struct
59 >  {
60      dlink_list list;
61    } mask,
62      leaf,
63      hub;
64  
65 <  struct {
65 >  struct
66 >  {
67      char buf[IRCD_BUFSIZE];
68    } name,
69 +    nick,
70      user,
71      host,
72      addr,
# Line 80 | Line 76 | static struct
76      cert,
77      rpass,
78      spass,
79 <    class;
79 >    whois,
80 >    class,
81 >    target,
82 >    prepend,
83 >    command;
84  
85 <  struct {
85 >  struct
86 >  {
87      unsigned int value;
88    } flags,
89      modes,
# Line 101 | Line 102 | static struct
102      max_ident,
103      max_sendq,
104      max_recvq,
105 +    max_channels,
106      cidr_bitlen_ipv4,
107      cidr_bitlen_ipv6,
108      number_per_cidr;
# Line 109 | Line 111 | static struct
111   static void
112   reset_block_state(void)
113   {
114 <  dlink_node *ptr = NULL, *ptr_next = NULL;
114 >  dlink_node *node = NULL, *node_next = NULL;
115  
116 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.mask.list.head)
116 >  DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head)
117    {
118 <    MyFree(ptr->data);
119 <    dlinkDelete(ptr, &block_state.mask.list);
120 <    free_dlink_node(ptr);
118 >    xfree(node->data);
119 >    dlinkDelete(node, &block_state.mask.list);
120 >    free_dlink_node(node);
121    }
122  
123 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.leaf.list.head)
123 >  DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head)
124    {
125 <    MyFree(ptr->data);
126 <    dlinkDelete(ptr, &block_state.leaf.list);
127 <    free_dlink_node(ptr);
125 >    xfree(node->data);
126 >    dlinkDelete(node, &block_state.leaf.list);
127 >    free_dlink_node(node);
128    }
129  
130 <  DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.hub.list.head)
130 >  DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head)
131    {
132 <    MyFree(ptr->data);
133 <    dlinkDelete(ptr, &block_state.hub.list);
134 <    free_dlink_node(ptr);
132 >    xfree(node->data);
133 >    dlinkDelete(node, &block_state.hub.list);
134 >    free_dlink_node(node);
135    }
136  
137    memset(&block_state, 0, sizeof(block_state));
# Line 148 | Line 150 | reset_block_state(void)
150   %token  ANTI_NICK_FLOOD
151   %token  ANTI_SPAM_EXIT_MESSAGE_TIME
152   %token  AUTOCONN
153 + %token  AWAY_COUNT
154 + %token  AWAY_TIME
155   %token  BYTES KBYTES MBYTES
156   %token  CALLER_ID_WAIT
157   %token  CAN_FLOOD
158   %token  CHANNEL
159 + %token  CHECK_CACHE
160   %token  CIDR_BITLEN_IPV4
161   %token  CIDR_BITLEN_IPV6
162   %token  CLASS
163 + %token  CLOSE
164   %token  CONNECT
165   %token  CONNECTFREQ
166 + %token  CYCLE_ON_HOST_CHANGE
167   %token  DEFAULT_FLOODCOUNT
168 < %token  DEFAULT_SPLIT_SERVER_COUNT
169 < %token  DEFAULT_SPLIT_USER_COUNT
168 > %token  DEFAULT_JOIN_FLOOD_COUNT
169 > %token  DEFAULT_JOIN_FLOOD_TIME
170 > %token  DEFAULT_MAX_CLIENTS
171   %token  DENY
172   %token  DESCRIPTION
173   %token  DIE
174   %token  DISABLE_AUTH
175   %token  DISABLE_FAKE_CHANNELS
176   %token  DISABLE_REMOTE_COMMANDS
177 + %token  DLINE_MIN_CIDR
178 + %token  DLINE_MIN_CIDR6
179   %token  DOTS_IN_IDENT
170 %token  EGDPOOL_PATH
180   %token  EMAIL
181   %token  ENCRYPTED
182   %token  EXCEED_LIMIT
183   %token  EXEMPT
184   %token  FAILED_OPER_NOTICE
185   %token  FLATTEN_LINKS
186 + %token  FLATTEN_LINKS_DELAY
187 + %token  FLATTEN_LINKS_FILE
188   %token  GECOS
189   %token  GENERAL
179 %token  GLINE
180 %token  GLINE_DURATION
181 %token  GLINE_ENABLE
182 %token  GLINE_EXEMPT
183 %token  GLINE_MIN_CIDR
184 %token  GLINE_MIN_CIDR6
185 %token  GLINE_REQUEST_DURATION
186 %token  GLOBAL_KILL
187 %token  HAVENT_READ_CONF
190   %token  HIDDEN
191   %token  HIDDEN_NAME
192 + %token  HIDE_CHANS
193 + %token  HIDE_IDLE
194   %token  HIDE_IDLE_FROM_OPERS
195   %token  HIDE_SERVER_IPS
196   %token  HIDE_SERVERS
197   %token  HIDE_SERVICES
194 %token  HIDE_SPOOF_IPS
198   %token  HOST
199   %token  HUB
200   %token  HUB_MASK
201   %token  IGNORE_BOGUS_TS
202   %token  INVISIBLE_ON_CONNECT
203 + %token  INVITE_CLIENT_COUNT
204 + %token  INVITE_CLIENT_TIME
205 + %token  INVITE_DELAY_CHANNEL
206   %token  IP
207   %token  IRCD_AUTH
208   %token  IRCD_FLAGS
209   %token  IRCD_SID
210 < %token  JOIN_FLOOD_COUNT
205 < %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
221 < %token  LINKS_DELAY
221 > %token  LIBGEOIP_DATABASE_OPTIONS
222 > %token  LIBGEOIP_IPV4_DATABASE_FILE
223 > %token  LIBGEOIP_IPV6_DATABASE_FILE
224   %token  LISTEN
225   %token  MASK
226   %token  MAX_ACCEPT
227   %token  MAX_BANS
228 < %token  MAX_CHANS_PER_OPER
219 < %token  MAX_CHANS_PER_USER
228 > %token  MAX_CHANNELS
229   %token  MAX_GLOBAL
230   %token  MAX_IDENT
231   %token  MAX_IDLE
# Line 228 | Line 237 | reset_block_state(void)
237   %token  MAX_TARGETS
238   %token  MAX_TOPIC_LENGTH
239   %token  MAX_WATCH
240 + %token  MEMORY_CACHE
241   %token  MIN_IDLE
242   %token  MIN_NONWILDCARD
243   %token  MIN_NONWILDCARD_SIMPLE
244 + %token  MMAP_CACHE
245   %token  MODULE
246   %token  MODULES
247   %token  MOTD
# Line 240 | Line 251 | reset_block_state(void)
251   %token  NETWORK_DESC
252   %token  NETWORK_NAME
253   %token  NICK
243 %token  NO_CREATE_ON_SPLIT
244 %token  NO_JOIN_ON_SPLIT
254   %token  NO_OPER_FLOOD
255   %token  NO_TILDE
256   %token  NUMBER
257   %token  NUMBER_PER_CIDR
258   %token  NUMBER_PER_IP
259   %token  OPER_ONLY_UMODES
251 %token  OPER_PASS_RESV
260   %token  OPER_UMODES
261   %token  OPERATOR
262   %token  OPERS_BYPASS_CALLERID
# Line 270 | Line 278 | reset_block_state(void)
278   %token  RESV
279   %token  RESV_EXEMPT
280   %token  RSA_PRIVATE_KEY_FILE
273 %token  RSA_PUBLIC_KEY_FILE
281   %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS
282   %token  SEND_PASSWORD
283   %token  SENDQ
# Line 283 | Line 290 | reset_block_state(void)
290   %token  SSL_CERTIFICATE_FILE
291   %token  SSL_CERTIFICATE_FINGERPRINT
292   %token  SSL_CONNECTION_REQUIRED
293 + %token  SSL_DH_ELLIPTIC_CURVE
294   %token  SSL_DH_PARAM_FILE
295 + %token  SSL_MESSAGE_DIGEST_ALGORITHM
296 + %token  STANDARD
297   %token  STATS_E_DISABLED
298   %token  STATS_I_OPER_ONLY
299   %token  STATS_K_OPER_ONLY
300 + %token  STATS_M_OPER_ONLY
301   %token  STATS_O_OPER_ONLY
302   %token  STATS_P_OPER_ONLY
303 + %token  STATS_U_OPER_ONLY
304   %token  T_ALL
305   %token  T_BOTS
306   %token  T_CALLERID
307   %token  T_CCONN
308 + %token  T_COMMAND
309   %token  T_CLUSTER
310   %token  T_DEAF
311   %token  T_DEBUG
# Line 307 | Line 320 | reset_block_state(void)
320   %token  T_IPV6
321   %token  T_LOCOPS
322   %token  T_LOG
310 %token  T_MAX_CLIENTS
323   %token  T_NCHANGE
324   %token  T_NONONREG
325 < %token  T_OPERWALL
325 > %token  T_OPME
326 > %token  T_PREPEND
327 > %token  T_PSEUDO
328   %token  T_RECVQ
329   %token  T_REJ
330   %token  T_RESTART
331   %token  T_SERVER
332   %token  T_SERVICE
319 %token  T_SERVICES_NAME
333   %token  T_SERVNOTICE
334   %token  T_SET
335   %token  T_SHARED
# Line 326 | Line 339 | reset_block_state(void)
339   %token  T_SPY
340   %token  T_SSL
341   %token  T_SSL_CIPHER_LIST
342 < %token  T_SSL_CLIENT_METHOD
330 < %token  T_SSL_SERVER_METHOD
331 < %token  T_SSLV3
332 < %token  T_TLSV1
342 > %token  T_TARGET
343   %token  T_UMODES
344   %token  T_UNAUTH
345   %token  T_UNDLINE
# Line 340 | Line 350 | reset_block_state(void)
350   %token  T_WALLOPS
351   %token  T_WEBIRC
352   %token  TBOOL
353 + %token  THROTTLE_COUNT
354   %token  THROTTLE_TIME
355   %token  TKLINE_EXPIRE_NOTICES
356   %token  TMASKED
346 %token  TRUE_NO_OPER_FLOOD
357   %token  TS_MAX_DELTA
358   %token  TS_WARN_DELTA
359   %token  TWODOTS
360   %token  TYPE
361   %token  UNKLINE
352 %token  USE_EGD
362   %token  USE_LOGGING
363   %token  USER
364   %token  VHOST
365   %token  VHOST6
366 < %token  WARN_NO_NLINE
366 > %token  WARN_NO_CONNECT_BLOCK
367 > %token  WHOIS
368 > %token  WHOWAS_HISTORY_LENGTH
369   %token  XLINE
370 + %token  XLINE_EXEMPT
371  
372   %type  <string> QSTRING
373   %type  <number> NUMBER
# Line 365 | Line 377 | reset_block_state(void)
377   %type  <number> sizespec_
378  
379   %%
380 < conf:  
380 > conf:
381          | conf conf_item
382          ;
383  
384   conf_item:        admin_entry
385                  | logging_entry
386                  | oper_entry
387 <                | channel_entry
388 <                | class_entry
387 >                | channel_entry
388 >                | class_entry
389                  | listen_entry
390                  | auth_entry
391                  | serverinfo_entry
392 <                | serverhide_entry
392 >                | serverhide_entry
393                  | resv_entry
394                  | service_entry
395                  | shared_entry
396 <                | cluster_entry
396 >                | cluster_entry
397                  | connect_entry
398                  | kill_entry
399                  | deny_entry
400 <                | exempt_entry
401 <                | general_entry
400 >                | exempt_entry
401 >                | general_entry
402                  | gecos_entry
403                  | modules_entry
404                  | motd_entry
405 +                | pseudo_entry
406                  | error ';'
407                  | error '}'
408          ;
409  
410  
411   timespec_: { $$ = 0; } | timespec;
412 < timespec:       NUMBER timespec_
413 <                {
414 <                        $$ = $1 + $2;
415 <                }
416 <                | NUMBER SECONDS timespec_
417 <                {
418 <                        $$ = $1 + $3;
419 <                }
420 <                | NUMBER MINUTES timespec_
421 <                {
422 <                        $$ = $1 * 60 + $3;
423 <                }
424 <                | NUMBER HOURS timespec_
425 <                {
426 <                        $$ = $1 * 60 * 60 + $3;
427 <                }
415 <                | NUMBER DAYS timespec_
416 <                {
417 <                        $$ = $1 * 60 * 60 * 24 + $3;
418 <                }
419 <                | NUMBER WEEKS timespec_
420 <                {
421 <                        $$ = $1 * 60 * 60 * 24 * 7 + $3;
422 <                }
423 <                | NUMBER MONTHS timespec_
424 <                {
425 <                        $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3;
426 <                }
427 <                | NUMBER YEARS timespec_
428 <                {
429 <                        $$ = $1 * 60 * 60 * 24 * 365 + $3;
430 <                }
431 <                ;
432 <
433 < sizespec_:      { $$ = 0; } | sizespec;
434 < sizespec:       NUMBER sizespec_ { $$ = $1 + $2; }
435 <                | NUMBER BYTES sizespec_ { $$ = $1 + $3; }
436 <                | NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; }
437 <                | NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
438 <                ;
412 > timespec:  NUMBER timespec_         { $$ = $1 + $2; } |
413 >           NUMBER SECONDS timespec_ { $$ = $1 + $3; } |
414 >           NUMBER MINUTES timespec_ { $$ = $1 * 60 + $3; } |
415 >           NUMBER HOURS timespec_   { $$ = $1 * 60 * 60 + $3; } |
416 >           NUMBER DAYS timespec_    { $$ = $1 * 60 * 60 * 24 + $3; } |
417 >           NUMBER WEEKS timespec_   { $$ = $1 * 60 * 60 * 24 * 7 + $3; } |
418 >           NUMBER MONTHS timespec_  { $$ = $1 * 60 * 60 * 24 * 7 * 4 + $3; } |
419 >           NUMBER YEARS timespec_   { $$ = $1 * 60 * 60 * 24 * 365 + $3; }
420 >           ;
421 >
422 > sizespec_:  { $$ = 0; } | sizespec;
423 > sizespec:   NUMBER sizespec_ { $$ = $1 + $2; } |
424 >            NUMBER BYTES sizespec_ { $$ = $1 + $3; } |
425 >            NUMBER KBYTES sizespec_ { $$ = $1 * 1024 + $3; } |
426 >            NUMBER MBYTES sizespec_ { $$ = $1 * 1024 * 1024 + $3; }
427 >            ;
428  
429  
430   /***************************************************************************
431 < *  section modules
431 > * modules {} section
432   ***************************************************************************/
433 < modules_entry: MODULES
445 <  '{' modules_items '}' ';';
433 > modules_entry: MODULES '{' modules_items '}' ';';
434  
435   modules_items:  modules_items modules_item | modules_item;
436   modules_item:   modules_module | modules_path | error ';' ;
# Line 460 | Line 448 | modules_path: PATH '=' QSTRING ';'
448   };
449  
450  
451 + /***************************************************************************
452 + * serverinfo {}  section
453 + ***************************************************************************/
454   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
455  
456   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
457 < serverinfo_item:        serverinfo_name | serverinfo_vhost |
458 <                        serverinfo_hub | serverinfo_description |
459 <                        serverinfo_network_name | serverinfo_network_desc |
460 <                        serverinfo_max_clients | serverinfo_max_nick_length |
461 <                        serverinfo_max_topic_length | serverinfo_ssl_dh_param_file |
462 <                        serverinfo_rsa_private_key_file | serverinfo_vhost6 |
463 <                        serverinfo_sid | serverinfo_ssl_certificate_file |
464 <                        serverinfo_ssl_client_method | serverinfo_ssl_server_method |
457 > serverinfo_item:        serverinfo_name |
458 >                        serverinfo_vhost |
459 >                        serverinfo_hub |
460 >                        serverinfo_description |
461 >                        serverinfo_network_name |
462 >                        serverinfo_network_desc |
463 >                        serverinfo_default_max_clients |
464 >                        serverinfo_max_nick_length |
465 >                        serverinfo_max_topic_length |
466 >                        serverinfo_ssl_dh_param_file |
467 >                        serverinfo_ssl_dh_elliptic_curve |
468 >                        serverinfo_rsa_private_key_file |
469 >                        serverinfo_vhost6 |
470 >                        serverinfo_sid |
471 >                        serverinfo_ssl_certificate_file |
472                          serverinfo_ssl_cipher_list |
473 <                        error ';' ;
474 <
473 >                        serverinfo_ssl_message_digest_algorithm |
474 >                        serverinfo_libgeoip_database_options |
475 >                        serverinfo_libgeoip_ipv4_database_file |
476 >                        serverinfo_libgeoip_ipv6_database_file |
477 >                        error ';' ;
478  
478 serverinfo_ssl_client_method: T_SSL_CLIENT_METHOD '=' client_method_types ';' ;
479 serverinfo_ssl_server_method: T_SSL_SERVER_METHOD '=' server_method_types ';' ;
480
481 client_method_types: client_method_types ',' client_method_type_item | client_method_type_item;
482 client_method_type_item: T_SSLV3
483 {
484 #ifdef HAVE_LIBCRYPTO
485  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
486    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv3);
487 #endif
488 } | T_TLSV1
489 {
490 #ifdef HAVE_LIBCRYPTO
491  if (conf_parser_ctx.pass == 2 && ServerInfo.client_ctx)
492    SSL_CTX_clear_options(ServerInfo.client_ctx, SSL_OP_NO_TLSv1);
493 #endif
494 };
495
496 server_method_types: server_method_types ',' server_method_type_item | server_method_type_item;
497 server_method_type_item: T_SSLV3
498 {
499 #ifdef HAVE_LIBCRYPTO
500  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
501    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3);
502 #endif
503 } | T_TLSV1
504 {
505 #ifdef HAVE_LIBCRYPTO
506  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
507    SSL_CTX_clear_options(ServerInfo.server_ctx, SSL_OP_NO_TLSv1);
508 #endif
509 };
479  
480   serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
481   {
482 < #ifdef HAVE_LIBCRYPTO
514 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
482 >  if (conf_parser_ctx.pass == 2)
483    {
484 <    if (!ServerInfo.rsa_private_key_file)
485 <    {
518 <      conf_error_report("No rsa_private_key_file specified, SSL disabled");
519 <      break;
520 <    }
521 <
522 <    if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string,
523 <                                     SSL_FILETYPE_PEM) <= 0 ||
524 <        SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string,
525 <                                     SSL_FILETYPE_PEM) <= 0)
526 <    {
527 <      report_crypto_errors();
528 <      conf_error_report("Could not open/read certificate file");
529 <      break;
530 <    }
531 <
532 <    if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file,
533 <                                    SSL_FILETYPE_PEM) <= 0 ||
534 <        SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file,
535 <                                    SSL_FILETYPE_PEM) <= 0)
536 <    {
537 <      report_crypto_errors();
538 <      conf_error_report("Could not read RSA private key");
539 <      break;
540 <    }
541 <
542 <    if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) ||
543 <        !SSL_CTX_check_private_key(ServerInfo.client_ctx))
544 <    {
545 <      report_crypto_errors();
546 <      conf_error_report("Could not read RSA private key");
547 <      break;
548 <    }
484 >    xfree(ConfigServerInfo.ssl_certificate_file);
485 >    ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string);
486    }
550 #endif
487   };
488  
489   serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';'
490   {
491 < #ifdef HAVE_LIBCRYPTO
556 <  BIO *file = NULL;
557 <
558 <  if (conf_parser_ctx.pass != 1)
559 <    break;
560 <
561 <  if (ServerInfo.rsa_private_key)
491 >  if (conf_parser_ctx.pass == 2)
492    {
493 <    RSA_free(ServerInfo.rsa_private_key);
494 <    ServerInfo.rsa_private_key = NULL;
493 >    xfree(ConfigServerInfo.rsa_private_key_file);
494 >    ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
495    }
496 + };
497  
498 <  if (ServerInfo.rsa_private_key_file)
498 > serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
499 > {
500 >  if (conf_parser_ctx.pass == 2)
501    {
502 <    MyFree(ServerInfo.rsa_private_key_file);
503 <    ServerInfo.rsa_private_key_file = NULL;
502 >    xfree(ConfigServerInfo.ssl_dh_param_file);
503 >    ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string);
504    }
505 + };
506  
507 <  ServerInfo.rsa_private_key_file = xstrdup(yylval.string);
508 <
509 <  if ((file = BIO_new_file(yylval.string, "r")) == NULL)
507 > serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
508 > {
509 >  if (conf_parser_ctx.pass == 2)
510    {
511 <    conf_error_report("File open failed, ignoring");
512 <    break;
511 >    xfree(ConfigServerInfo.ssl_cipher_list);
512 >    ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string);
513    }
514 + };
515  
516 <  ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
517 <
518 <  BIO_set_close(file, BIO_CLOSE);
584 <  BIO_free(file);
585 <
586 <  if (ServerInfo.rsa_private_key == NULL)
516 > serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
517 > {
518 >  if (conf_parser_ctx.pass == 2)
519    {
520 <    conf_error_report("Couldn't extract key, ignoring");
521 <    break;
520 >    xfree(ConfigServerInfo.ssl_message_digest_algorithm);
521 >    ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string);
522    }
523 + }
524  
525 <  if (!RSA_check_key(ServerInfo.rsa_private_key))
525 > serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
526 > {
527 >  if (conf_parser_ctx.pass == 2)
528    {
529 <    RSA_free(ServerInfo.rsa_private_key);
530 <    ServerInfo.rsa_private_key = NULL;
596 <
597 <    conf_error_report("Invalid key, ignoring");
598 <    break;
529 >    xfree(ConfigServerInfo.ssl_dh_elliptic_curve);
530 >    ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string);
531    }
532 + };
533  
534 <  /* require 2048 bit (256 byte) key */
535 <  if (RSA_size(ServerInfo.rsa_private_key) != 256)
536 <  {
537 <    RSA_free(ServerInfo.rsa_private_key);
538 <    ServerInfo.rsa_private_key = NULL;
534 > serverinfo_libgeoip_database_options: LIBGEOIP_DATABASE_OPTIONS
535 > {
536 >  if (conf_parser_ctx.pass == 1)
537 >    ConfigServerInfo.libgeoip_database_options = 0;
538 > } '='  options_items ';';
539  
540 <    conf_error_report("Not a 2048 bit key, ignoring");
541 <  }
540 > options_items: options_items ',' options_item | options_item;
541 > options_item: STANDARD
542 > {
543 > #ifdef HAVE_LIBGEOIP
544 >  if (conf_parser_ctx.pass == 1)
545 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_STANDARD;
546 > #endif
547 > } | MEMORY_CACHE
548 > {
549 > #ifdef HAVE_LIBGEOIP
550 >  if (conf_parser_ctx.pass == 1)
551 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_MEMORY_CACHE;
552 > #endif
553 > } | MMAP_CACHE
554 > {
555 > #ifdef HAVE_LIBGEOIP
556 >  if (conf_parser_ctx.pass == 1)
557 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_MMAP_CACHE;
558 > #endif
559 > } | CHECK_CACHE
560 > {
561 > #ifdef HAVE_LIBGEOIP
562 >  if (conf_parser_ctx.pass == 1)
563 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_CHECK_CACHE;
564   #endif
565   };
566  
567 < serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
567 > serverinfo_libgeoip_ipv4_database_file:  LIBGEOIP_IPV4_DATABASE_FILE '=' QSTRING ';'
568   {
569 < /* TBD - XXX: error reporting */
615 < #ifdef HAVE_LIBCRYPTO
616 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
569 >  if (conf_parser_ctx.pass == 2)
570    {
571 <    BIO *file = BIO_new_file(yylval.string, "r");
572 <
620 <    if (file)
621 <    {
622 <      DH *dh = PEM_read_bio_DHparams(file, NULL, NULL, NULL);
571 >    xfree(ConfigServerInfo.libgeoip_ipv4_database_file);
572 >    ConfigServerInfo.libgeoip_ipv4_database_file = xstrdup(yylval.string);
573  
574 <      BIO_free(file);
575 <
576 <      if (dh)
577 <      {
628 <        if (DH_size(dh) < 128)
629 <          conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
630 <        else
631 <          SSL_CTX_set_tmp_dh(ServerInfo.server_ctx, dh);
632 <
633 <        DH_free(dh);
634 <      }
635 <    }
636 <  }
574 > #ifdef HAVE_LIBGEOIP
575 >    if (GeoIPv4_ctx)
576 >      GeoIP_delete(GeoIPv4_ctx);
577 >    GeoIPv4_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
578   #endif
579 +  }
580   };
581  
582 < serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
582 > serverinfo_libgeoip_ipv6_database_file:  LIBGEOIP_IPV6_DATABASE_FILE '=' QSTRING ';'
583   {
584 < #ifdef HAVE_LIBCRYPTO
585 <  if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx)
586 <    SSL_CTX_set_cipher_list(ServerInfo.server_ctx, yylval.string);
584 >  if (conf_parser_ctx.pass == 2)
585 >  {
586 >    xfree(ConfigServerInfo.libgeoip_ipv6_database_file);
587 >    ConfigServerInfo.libgeoip_ipv6_database_file = xstrdup(yylval.string);
588 >
589 > #ifdef HAVE_LIBGEOIP
590 >    if (GeoIPv6_ctx)
591 >      GeoIP_delete(GeoIPv6_ctx);
592 >    GeoIPv6_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
593   #endif
594 +  }
595   };
596  
597 < serverinfo_name: NAME '=' QSTRING ';'
597 > serverinfo_name: NAME '=' QSTRING ';'
598   {
599 <  /* this isn't rehashable */
600 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.name)
599 >  /* This isn't rehashable */
600 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
601    {
602      if (valid_servname(yylval.string))
603 <      ServerInfo.name = xstrdup(yylval.string);
603 >      ConfigServerInfo.name = xstrdup(yylval.string);
604      else
605      {
606        conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
607 <      exit(0);
607 >      exit(EXIT_FAILURE);
608      }
609    }
610   };
611  
612 < serverinfo_sid: IRCD_SID '=' QSTRING ';'
612 > serverinfo_sid: IRCD_SID '=' QSTRING ';'
613   {
614 <  /* this isn't rehashable */
615 <  if (conf_parser_ctx.pass == 2 && !ServerInfo.sid)
614 >  /* This isn't rehashable */
615 >  if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
616    {
617      if (valid_sid(yylval.string))
618 <      ServerInfo.sid = xstrdup(yylval.string);
618 >      ConfigServerInfo.sid = xstrdup(yylval.string);
619      else
620      {
621        conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
622 <      exit(0);
622 >      exit(EXIT_FAILURE);
623      }
624    }
625   };
# Line 679 | Line 628 | serverinfo_description: DESCRIPTION '='
628   {
629    if (conf_parser_ctx.pass == 2)
630    {
631 <    MyFree(ServerInfo.description);
632 <    ServerInfo.description = xstrdup(yylval.string);
631 >    xfree(ConfigServerInfo.description);
632 >    ConfigServerInfo.description = xstrdup(yylval.string);
633 >    strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info));
634    }
635   };
636  
# Line 690 | Line 640 | serverinfo_network_name: NETWORK_NAME '=
640    {
641      char *p;
642  
643 <    if ((p = strchr(yylval.string, ' ')) != NULL)
644 <      p = '\0';
643 >    if ((p = strchr(yylval.string, ' ')))
644 >      *p = '\0';
645  
646 <    MyFree(ServerInfo.network_name);
647 <    ServerInfo.network_name = xstrdup(yylval.string);
646 >    xfree(ConfigServerInfo.network_name);
647 >    ConfigServerInfo.network_name = xstrdup(yylval.string);
648    }
649   };
650  
# Line 703 | Line 653 | serverinfo_network_desc: NETWORK_DESC '=
653    if (conf_parser_ctx.pass != 2)
654      break;
655  
656 <  MyFree(ServerInfo.network_desc);
657 <  ServerInfo.network_desc = xstrdup(yylval.string);
656 >  xfree(ConfigServerInfo.network_desc);
657 >  ConfigServerInfo.network_desc = xstrdup(yylval.string);
658   };
659  
660   serverinfo_vhost: VHOST '=' QSTRING ';'
# Line 723 | Line 673 | serverinfo_vhost: VHOST '=' QSTRING ';'
673        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string);
674      else
675      {
676 <      assert(res != NULL);
676 >      assert(res);
677  
678 <      memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen);
679 <      ServerInfo.ip.ss.ss_family = res->ai_family;
680 <      ServerInfo.ip.ss_len = res->ai_addrlen;
678 >      memcpy(&ConfigServerInfo.ip, res->ai_addr, res->ai_addrlen);
679 >      ConfigServerInfo.ip.ss.ss_family = res->ai_family;
680 >      ConfigServerInfo.ip.ss_len = res->ai_addrlen;
681        freeaddrinfo(res);
682  
683 <      ServerInfo.specific_ipv4_vhost = 1;
683 >      ConfigServerInfo.specific_ipv4_vhost = 1;
684      }
685    }
686   };
687  
688   serverinfo_vhost6: VHOST6 '=' QSTRING ';'
689   {
740 #ifdef IPV6
690    if (conf_parser_ctx.pass == 2 && *yylval.string != '*')
691    {
692      struct addrinfo hints, *res;
# Line 752 | Line 701 | serverinfo_vhost6: VHOST6 '=' QSTRING ';
701        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string);
702      else
703      {
704 <      assert(res != NULL);
704 >      assert(res);
705  
706 <      memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen);
707 <      ServerInfo.ip6.ss.ss_family = res->ai_family;
708 <      ServerInfo.ip6.ss_len = res->ai_addrlen;
706 >      memcpy(&ConfigServerInfo.ip6, res->ai_addr, res->ai_addrlen);
707 >      ConfigServerInfo.ip6.ss.ss_family = res->ai_family;
708 >      ConfigServerInfo.ip6.ss_len = res->ai_addrlen;
709        freeaddrinfo(res);
710  
711 <      ServerInfo.specific_ipv6_vhost = 1;
711 >      ConfigServerInfo.specific_ipv6_vhost = 1;
712      }
713    }
765 #endif
714   };
715  
716 < serverinfo_max_clients: T_MAX_CLIENTS '=' NUMBER ';'
716 > serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';'
717   {
718    if (conf_parser_ctx.pass != 2)
719      break;
720  
721    if ($3 < MAXCLIENTS_MIN)
722    {
723 <    char buf[IRCD_BUFSIZE];
723 >    char buf[IRCD_BUFSIZE] = "";
724  
725      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
726      conf_error_report(buf);
727 <    ServerInfo.max_clients = MAXCLIENTS_MIN;
727 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MIN;
728    }
729    else if ($3 > MAXCLIENTS_MAX)
730    {
731 <    char buf[IRCD_BUFSIZE];
731 >    char buf[IRCD_BUFSIZE] = "";
732  
733      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
734      conf_error_report(buf);
735 <    ServerInfo.max_clients = MAXCLIENTS_MAX;
735 >    ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX;
736    }
737    else
738 <    ServerInfo.max_clients = $3;
738 >    ConfigServerInfo.default_max_clients = $3;
739   };
740  
741   serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';'
# Line 798 | Line 746 | serverinfo_max_nick_length: MAX_NICK_LEN
746    if ($3 < 9)
747    {
748      conf_error_report("max_nick_length too low, setting to 9");
749 <    ServerInfo.max_nick_length = 9;
749 >    ConfigServerInfo.max_nick_length = 9;
750    }
751    else if ($3 > NICKLEN)
752    {
753 <    char buf[IRCD_BUFSIZE];
753 >    char buf[IRCD_BUFSIZE] = "";
754  
755      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
756      conf_error_report(buf);
757 <    ServerInfo.max_nick_length = NICKLEN;
757 >    ConfigServerInfo.max_nick_length = NICKLEN;
758    }
759    else
760 <    ServerInfo.max_nick_length = $3;
760 >    ConfigServerInfo.max_nick_length = $3;
761   };
762  
763   serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';'
# Line 820 | Line 768 | serverinfo_max_topic_length: MAX_TOPIC_L
768    if ($3 < 80)
769    {
770      conf_error_report("max_topic_length too low, setting to 80");
771 <    ServerInfo.max_topic_length = 80;
771 >    ConfigServerInfo.max_topic_length = 80;
772    }
773    else if ($3 > TOPICLEN)
774    {
775 <    char buf[IRCD_BUFSIZE];
775 >    char buf[IRCD_BUFSIZE] = "";
776  
777      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
778      conf_error_report(buf);
779 <    ServerInfo.max_topic_length = TOPICLEN;
779 >    ConfigServerInfo.max_topic_length = TOPICLEN;
780    }
781    else
782 <    ServerInfo.max_topic_length = $3;
782 >    ConfigServerInfo.max_topic_length = $3;
783   };
784  
785 < serverinfo_hub: HUB '=' TBOOL ';'
785 > serverinfo_hub: HUB '=' TBOOL ';'
786   {
787    if (conf_parser_ctx.pass == 2)
788 <    ServerInfo.hub = yylval.number;
788 >    ConfigServerInfo.hub = yylval.number;
789   };
790  
791 +
792   /***************************************************************************
793 < * admin section
793 > * admin {} section
794   ***************************************************************************/
795   admin_entry: ADMIN  '{' admin_items '}' ';' ;
796  
797   admin_items: admin_items admin_item | admin_item;
798 < admin_item:  admin_name | admin_description |
799 <             admin_email | error ';' ;
798 > admin_item:  admin_name |
799 >             admin_description |
800 >             admin_email |
801 >             error ';' ;
802  
803 < admin_name: NAME '=' QSTRING ';'
803 > admin_name: NAME '=' QSTRING ';'
804   {
805    if (conf_parser_ctx.pass != 2)
806      break;
807  
808 <  MyFree(AdminInfo.name);
809 <  AdminInfo.name = xstrdup(yylval.string);
808 >  xfree(ConfigAdminInfo.name);
809 >  ConfigAdminInfo.name = xstrdup(yylval.string);
810   };
811  
812   admin_email: EMAIL '=' QSTRING ';'
# Line 863 | Line 814 | admin_email: EMAIL '=' QSTRING ';'
814    if (conf_parser_ctx.pass != 2)
815      break;
816  
817 <  MyFree(AdminInfo.email);
818 <  AdminInfo.email = xstrdup(yylval.string);
817 >  xfree(ConfigAdminInfo.email);
818 >  ConfigAdminInfo.email = xstrdup(yylval.string);
819   };
820  
821   admin_description: DESCRIPTION '=' QSTRING ';'
# Line 872 | Line 823 | admin_description: DESCRIPTION '=' QSTRI
823    if (conf_parser_ctx.pass != 2)
824      break;
825  
826 <  MyFree(AdminInfo.description);
827 <  AdminInfo.description = xstrdup(yylval.string);
826 >  xfree(ConfigAdminInfo.description);
827 >  ConfigAdminInfo.description = xstrdup(yylval.string);
828   };
829  
830 +
831   /***************************************************************************
832 < * motd section
832 > * motd {} section
833   ***************************************************************************/
834 < motd_entry: MOTD
834 > motd_entry: MOTD
835   {
836    if (conf_parser_ctx.pass == 2)
837      reset_block_state();
838   } '{' motd_items '}' ';'
839   {
840 <  dlink_node *ptr = NULL;
840 >  dlink_node *node = NULL;
841  
842    if (conf_parser_ctx.pass != 2)
843      break;
# Line 893 | Line 845 | motd_entry: MOTD
845    if (!block_state.file.buf[0])
846      break;
847  
848 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
849 <    motd_add(ptr->data, block_state.file.buf);
848 >  DLINK_FOREACH(node, block_state.mask.list.head)
849 >    motd_add(node->data, block_state.file.buf);
850   };
851  
852   motd_items: motd_items motd_item | motd_item;
853   motd_item:  motd_mask | motd_file | error ';' ;
854  
855 < motd_mask: MASK '=' QSTRING ';'
855 > motd_mask: MASK '=' QSTRING ';'
856   {
857    if (conf_parser_ctx.pass == 2)
858      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list);
# Line 912 | Line 864 | motd_file: T_FILE '=' QSTRING ';'
864      strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
865   };
866  
867 +
868   /***************************************************************************
869 < *  section logging
869 > * pseudo {} section
870 > ***************************************************************************/
871 > pseudo_entry: T_PSEUDO
872 > {
873 >  if (conf_parser_ctx.pass == 2)
874 >    reset_block_state();
875 > } '{' pseudo_items '}' ';'
876 > {
877 >  if (conf_parser_ctx.pass != 2)
878 >    break;
879 >
880 >  if (!block_state.command.buf[0] ||
881 >      !block_state.name.buf[0] ||
882 >      !block_state.nick.buf[0] ||
883 >      !block_state.host.buf[0])
884 >    break;
885 >
886 >  pseudo_register(block_state.name.buf, block_state.nick.buf, block_state.host.buf,
887 >                  block_state.prepend.buf, block_state.command.buf);
888 > };
889 >
890 > pseudo_items: pseudo_items pseudo_item | pseudo_item;
891 > pseudo_item:  pseudo_command | pseudo_prepend | pseudo_name | pseudo_target | error ';' ;
892 >
893 > pseudo_command: T_COMMAND '=' QSTRING ';'
894 > {
895 >  if (conf_parser_ctx.pass == 2)
896 >    strlcpy(block_state.command.buf, yylval.string, sizeof(block_state.command.buf));
897 > };
898 >
899 > pseudo_name: NAME '=' QSTRING ';'
900 > {
901 >  if (conf_parser_ctx.pass == 2)
902 >    strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
903 > };
904 >
905 > pseudo_prepend: T_PREPEND '=' QSTRING ';'
906 > {
907 >  if (conf_parser_ctx.pass == 2)
908 >    strlcpy(block_state.prepend.buf, yylval.string, sizeof(block_state.prepend.buf));
909 > };
910 >
911 > pseudo_target: T_TARGET '=' QSTRING ';'
912 > {
913 >  if (conf_parser_ctx.pass == 2)
914 >  {
915 >    struct split_nuh_item nuh;
916 >
917 >    nuh.nuhmask  = yylval.string;
918 >    nuh.nickptr  = NULL;
919 >    nuh.userptr  = block_state.nick.buf;
920 >    nuh.hostptr  = block_state.host.buf;
921 >    nuh.nicksize = 0;
922 >    nuh.usersize = sizeof(block_state.nick.buf);
923 >    nuh.hostsize = sizeof(block_state.host.buf);
924 >
925 >    split_nuh(&nuh);
926 >  }
927 > };
928 >
929 >
930 > /***************************************************************************
931 > * log {} section
932   ***************************************************************************/
933   logging_entry:          T_LOG  '{' logging_items '}' ';' ;
934   logging_items:          logging_items logging_item | logging_item ;
935  
936 < logging_item:           logging_use_logging | logging_file_entry |
937 <                        error ';' ;
936 > logging_item:           logging_use_logging | logging_file_entry |
937 >                        error ';' ;
938  
939   logging_use_logging: USE_LOGGING '=' TBOOL ';'
940   {
941    if (conf_parser_ctx.pass == 2)
942 <    ConfigLoggingEntry.use_logging = yylval.number;
942 >    ConfigLog.use_logging = yylval.number;
943   };
944  
945   logging_file_entry:
# Line 978 | Line 993 | logging_file_type_item:  USER
993   {
994    if (conf_parser_ctx.pass == 2)
995      block_state.type.value = LOG_TYPE_OPER;
996 < } | GLINE
996 > } | XLINE
997 > {
998 >  if (conf_parser_ctx.pass == 2)
999 >    block_state.type.value = LOG_TYPE_XLINE;
1000 > } | RESV
1001   {
1002    if (conf_parser_ctx.pass == 2)
1003 <    block_state.type.value = LOG_TYPE_GLINE;
1003 >    block_state.type.value = LOG_TYPE_RESV;
1004   } | T_DLINE
1005   {
1006    if (conf_parser_ctx.pass == 2)
# Line 1002 | Line 1021 | logging_file_type_item:  USER
1021  
1022  
1023   /***************************************************************************
1024 < * section oper
1024 > * operator {} section
1025   ***************************************************************************/
1026 < oper_entry: OPERATOR
1026 > oper_entry: OPERATOR
1027   {
1028    if (conf_parser_ctx.pass != 2)
1029      break;
# Line 1013 | Line 1032 | oper_entry: OPERATOR
1032    block_state.flags.value |= CONF_FLAGS_ENCRYPTED;
1033   } '{' oper_items '}' ';'
1034   {
1035 <  dlink_node *ptr = NULL;
1035 >  dlink_node *node = NULL;
1036  
1037    if (conf_parser_ctx.pass != 2)
1038      break;
1039  
1040    if (!block_state.name.buf[0])
1041      break;
1042 < #ifdef HAVE_LIBCRYPTO
1024 <  if (!block_state.file.buf[0] &&
1025 <      !block_state.rpass.buf[0])
1026 <    break;
1027 < #else
1042 >
1043    if (!block_state.rpass.buf[0])
1044      break;
1030 #endif
1045  
1046 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1046 >  DLINK_FOREACH(node, block_state.mask.list.head)
1047    {
1048      struct MaskItem *conf = NULL;
1049      struct split_nuh_item nuh;
1050 +    char *s = node->data;
1051  
1052 <    nuh.nuhmask  = ptr->data;
1052 >    if (EmptyString(s))
1053 >      continue;
1054 >
1055 >    nuh.nuhmask  = s;
1056      nuh.nickptr  = NULL;
1057      nuh.userptr  = block_state.user.buf;
1058      nuh.hostptr  = block_state.host.buf;
# Line 1054 | Line 1072 | oper_entry: OPERATOR
1072      if (block_state.rpass.buf[0])
1073        conf->passwd = xstrdup(block_state.rpass.buf);
1074  
1075 +    if (block_state.whois.buf[0])
1076 +      conf->whois = xstrdup(block_state.whois.buf);
1077 +
1078      conf->flags = block_state.flags.value;
1079      conf->modes = block_state.modes.value;
1080      conf->port  = block_state.port.value;
1081      conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits);
1082  
1083      conf_add_class_to_conf(conf, block_state.class.buf);
1063
1064 #ifdef HAVE_LIBCRYPTO
1065    if (block_state.file.buf[0])
1066    {
1067      BIO *file = NULL;
1068      RSA *pkey = NULL;
1069
1070      if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1071      {
1072        conf_error_report("Ignoring rsa_public_key_file -- file doesn't exist");
1073        break;
1074      }
1075
1076      if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1077        conf_error_report("Ignoring rsa_public_key_file -- Key invalid; check key syntax.");
1078
1079      conf->rsa_public_key = pkey;
1080      BIO_set_close(file, BIO_CLOSE);
1081      BIO_free(file);
1082    }
1083 #endif /* HAVE_LIBCRYPTO */
1084    }
1085   };
1086  
1087   oper_items:     oper_items oper_item | oper_item;
1088 < oper_item:      oper_name | oper_user | oper_password |
1089 <                oper_umodes | oper_class | oper_encrypted |
1090 <                oper_rsa_public_key_file | oper_ssl_certificate_fingerprint |
1091 <                oper_ssl_connection_required |
1092 <                oper_flags | error ';' ;
1088 > oper_item:      oper_name |
1089 >                oper_user |
1090 >                oper_password |
1091 >                oper_whois |
1092 >                oper_umodes |
1093 >                oper_class |
1094 >                oper_encrypted |
1095 >                oper_ssl_certificate_fingerprint |
1096 >                oper_ssl_connection_required |
1097 >                oper_flags |
1098 >                error ';' ;
1099  
1100   oper_name: NAME '=' QSTRING ';'
1101   {
# Line 1109 | Line 1115 | oper_password: PASSWORD '=' QSTRING ';'
1115      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
1116   };
1117  
1118 + oper_whois: WHOIS '=' QSTRING ';'
1119 + {
1120 +  if (conf_parser_ctx.pass == 2)
1121 +    strlcpy(block_state.whois.buf, yylval.string, sizeof(block_state.whois.buf));
1122 + };
1123 +
1124   oper_encrypted: ENCRYPTED '=' TBOOL ';'
1125   {
1126    if (conf_parser_ctx.pass != 2)
# Line 1120 | Line 1132 | oper_encrypted: ENCRYPTED '=' TBOOL ';'
1132      block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED;
1133   };
1134  
1123 oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';'
1124 {
1125  if (conf_parser_ctx.pass == 2)
1126    strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
1127 };
1128
1135   oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1136   {
1137    if (conf_parser_ctx.pass == 2)
# Line 1180 | Line 1186 | oper_umodes_item:  T_BOTS
1186   {
1187    if (conf_parser_ctx.pass == 2)
1188      block_state.modes.value |= UMODE_HIDDEN;
1189 + } | HIDE_CHANS
1190 + {
1191 +  if (conf_parser_ctx.pass == 2)
1192 +    block_state.modes.value |= UMODE_HIDECHANS;
1193 + } | HIDE_IDLE
1194 + {
1195 +  if (conf_parser_ctx.pass == 2)
1196 +    block_state.modes.value |= UMODE_HIDEIDLE;
1197   } | T_SKILL
1198   {
1199    if (conf_parser_ctx.pass == 2)
# Line 1204 | Line 1218 | oper_umodes_item:  T_BOTS
1218   {
1219    if (conf_parser_ctx.pass == 2)
1220      block_state.modes.value |= UMODE_EXTERNAL;
1207 } | T_OPERWALL
1208 {
1209  if (conf_parser_ctx.pass == 2)
1210    block_state.modes.value |= UMODE_OPERWALL;
1221   } | T_SERVNOTICE
1222   {
1223    if (conf_parser_ctx.pass == 2)
# Line 1276 | Line 1286 | oper_flags_item: KILL ':' REMOTE
1286   } | KLINE
1287   {
1288    if (conf_parser_ctx.pass == 2)
1289 <    block_state.port.value |= OPER_FLAG_K;
1289 >    block_state.port.value |= OPER_FLAG_KLINE;
1290   } | UNKLINE
1291   {
1292    if (conf_parser_ctx.pass == 2)
# Line 1292 | Line 1302 | oper_flags_item: KILL ':' REMOTE
1302   } | XLINE
1303   {
1304    if (conf_parser_ctx.pass == 2)
1305 <    block_state.port.value |= OPER_FLAG_X;
1306 < } | GLINE
1305 >    block_state.port.value |= OPER_FLAG_XLINE;
1306 > } | T_UNXLINE
1307   {
1308    if (conf_parser_ctx.pass == 2)
1309 <    block_state.port.value |= OPER_FLAG_GLINE;
1309 >    block_state.port.value |= OPER_FLAG_UNXLINE;
1310   } | DIE
1311   {
1312    if (conf_parser_ctx.pass == 2)
# Line 1305 | Line 1315 | oper_flags_item: KILL ':' REMOTE
1315   {
1316    if (conf_parser_ctx.pass == 2)
1317      block_state.port.value |= OPER_FLAG_RESTART;
1318 + } | REHASH ':' REMOTE
1319 + {
1320 +  if (conf_parser_ctx.pass == 2)
1321 +    block_state.port.value |= OPER_FLAG_REHASH_REMOTE;
1322   } | REHASH
1323   {
1324    if (conf_parser_ctx.pass == 2)
# Line 1313 | Line 1327 | oper_flags_item: KILL ':' REMOTE
1327   {
1328    if (conf_parser_ctx.pass == 2)
1329      block_state.port.value |= OPER_FLAG_ADMIN;
1316 } | T_OPERWALL
1317 {
1318  if (conf_parser_ctx.pass == 2)
1319    block_state.port.value |= OPER_FLAG_OPERWALL;
1330   } | T_GLOBOPS
1331   {
1332    if (conf_parser_ctx.pass == 2)
# Line 1341 | Line 1351 | oper_flags_item: KILL ':' REMOTE
1351   {
1352    if (conf_parser_ctx.pass == 2)
1353      block_state.port.value |= OPER_FLAG_MODULE;
1354 + } | T_OPME
1355 + {
1356 +  if (conf_parser_ctx.pass == 2)
1357 +    block_state.port.value |= OPER_FLAG_OPME;
1358 + } | NICK ':' RESV
1359 + {
1360 +  if (conf_parser_ctx.pass == 2)
1361 +    block_state.port.value |= OPER_FLAG_NICK_RESV;
1362 + } | JOIN ':' RESV
1363 + {
1364 +  if (conf_parser_ctx.pass == 2)
1365 +    block_state.port.value |= OPER_FLAG_JOIN_RESV;
1366 + } | RESV
1367 + {
1368 +  if (conf_parser_ctx.pass == 2)
1369 +    block_state.port.value |= OPER_FLAG_RESV;
1370 + } | T_UNRESV
1371 + {
1372 +  if (conf_parser_ctx.pass == 2)
1373 +    block_state.port.value |= OPER_FLAG_UNRESV;
1374 + } | CLOSE
1375 + {
1376 +  if (conf_parser_ctx.pass == 2)
1377 +    block_state.port.value |= OPER_FLAG_CLOSE;
1378   };
1379  
1380  
1381   /***************************************************************************
1382 < *  section class
1382 > * class {} section
1383   ***************************************************************************/
1384   class_entry: CLASS
1385   {
# Line 1373 | Line 1407 | class_entry: CLASS
1407      class = class_make();
1408  
1409    class->active = 1;
1410 <  MyFree(class->name);
1410 >  xfree(class->name);
1411    class->name = xstrdup(block_state.class.buf);
1412    class->ping_freq = block_state.ping_freq.value;
1413    class->max_perip = block_state.max_perip.value;
# Line 1384 | Line 1418 | class_entry: CLASS
1418    class->max_ident = block_state.max_ident.value;
1419    class->max_sendq = block_state.max_sendq.value;
1420    class->max_recvq = block_state.max_recvq.value;
1421 +  class->max_channels = block_state.max_channels.value;
1422  
1423    if (block_state.min_idle.value > block_state.max_idle.value)
1424    {
# Line 1396 | Line 1431 | class_entry: CLASS
1431    class->min_idle = block_state.min_idle.value;
1432    class->max_idle = block_state.max_idle.value;
1433  
1434 <  if (class->number_per_cidr && block_state.number_per_cidr.value)
1400 <    if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1401 <        (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
1402 <      if ((class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value) ||
1403 <          (class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value))
1404 <        rebuild_cidr_list(class);
1434 >  rebuild_cidr_list(class);
1435  
1436    class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value;
1437    class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value;
# Line 1410 | Line 1440 | class_entry: CLASS
1440  
1441   class_items:    class_items class_item | class_item;
1442   class_item:     class_name |
1443 <                class_cidr_bitlen_ipv4 | class_cidr_bitlen_ipv6 |
1443 >                class_cidr_bitlen_ipv4 |
1444 >                class_cidr_bitlen_ipv6 |
1445                  class_ping_time |
1446 <                class_number_per_cidr |
1446 >                class_number_per_cidr |
1447                  class_number_per_ip |
1448                  class_connectfreq |
1449 +                class_max_channels |
1450                  class_max_number |
1451 <                class_max_global |
1452 <                class_max_local |
1453 <                class_max_ident |
1451 >                class_max_global |
1452 >                class_max_local |
1453 >                class_max_ident |
1454                  class_sendq | class_recvq |
1455                  class_min_idle |
1456                  class_max_idle |
1457                  class_flags |
1458 <                error ';' ;
1458 >                error ';' ;
1459  
1460 < class_name: NAME '=' QSTRING ';'
1460 > class_name: NAME '=' QSTRING ';'
1461   {
1462    if (conf_parser_ctx.pass == 1)
1463      strlcpy(block_state.class.buf, yylval.string, sizeof(block_state.class.buf));
# Line 1449 | Line 1481 | class_connectfreq: CONNECTFREQ '=' times
1481      block_state.con_freq.value = $3;
1482   };
1483  
1484 + class_max_channels: MAX_CHANNELS '=' NUMBER ';'
1485 + {
1486 +  if (conf_parser_ctx.pass == 1)
1487 +    block_state.max_channels.value = $3;
1488 + };
1489 +
1490   class_max_number: MAX_NUMBER '=' NUMBER ';'
1491   {
1492    if (conf_parser_ctx.pass == 1)
# Line 1541 | Line 1579 | class_flags_item: RANDOM_IDLE
1579  
1580  
1581   /***************************************************************************
1582 < *  section listen
1582 > * listen {} section
1583   ***************************************************************************/
1584   listen_entry: LISTEN
1585   {
# Line 1580 | Line 1618 | port_item: NUMBER
1618   {
1619    if (conf_parser_ctx.pass == 2)
1620    {
1621 + #ifndef HAVE_TLS
1622      if (block_state.flags.value & LISTENER_SSL)
1623 < #ifdef HAVE_LIBCRYPTO
1624 <      if (!ServerInfo.server_ctx)
1623 >    {
1624 >      conf_error_report("TLS not available - port closed");
1625 >      break;
1626 >    }
1627   #endif
1628 <      {
1588 <        conf_error_report("SSL not available - port closed");
1589 <        break;
1590 <      }
1591 <    add_listener($1, block_state.addr.buf, block_state.flags.value);
1628 >    listener_add($1, block_state.addr.buf, block_state.flags.value);
1629    }
1630   } | NUMBER TWODOTS NUMBER
1631   {
1632    if (conf_parser_ctx.pass == 2)
1633    {
1634 <    int i;
1598 <
1634 > #ifndef HAVE_TLS
1635      if (block_state.flags.value & LISTENER_SSL)
1636 < #ifdef HAVE_LIBCRYPTO
1637 <      if (!ServerInfo.server_ctx)
1636 >    {
1637 >      conf_error_report("TLS not available - port closed");
1638 >      break;
1639 >    }
1640   #endif
1603      {
1604        conf_error_report("SSL not available - port closed");
1605        break;
1606      }
1641  
1642 <    for (i = $1; i <= $3; ++i)
1643 <      add_listener(i, block_state.addr.buf, block_state.flags.value);
1642 >    for (int i = $1; i <= $3; ++i)
1643 >      listener_add(i, block_state.addr.buf, block_state.flags.value);
1644    }
1645   };
1646  
# Line 1622 | Line 1656 | listen_host: HOST '=' QSTRING ';'
1656      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
1657   };
1658  
1659 +
1660   /***************************************************************************
1661 < *  section auth
1661 > * auth {} section
1662   ***************************************************************************/
1663   auth_entry: IRCD_AUTH
1664   {
# Line 1631 | Line 1666 | auth_entry: IRCD_AUTH
1666      reset_block_state();
1667   } '{' auth_items '}' ';'
1668   {
1669 <  dlink_node *ptr = NULL;
1669 >  dlink_node *node = NULL;
1670  
1671    if (conf_parser_ctx.pass != 2)
1672      break;
1673  
1674 <  DLINK_FOREACH(ptr, block_state.mask.list.head)
1674 >  DLINK_FOREACH(node, block_state.mask.list.head)
1675    {
1676      struct MaskItem *conf = NULL;
1677      struct split_nuh_item nuh;
1678 +    char *s = node->data;
1679 +
1680 +    if (EmptyString(s))
1681 +      continue;
1682  
1683 <    nuh.nuhmask  = ptr->data;
1683 >    nuh.nuhmask  = s;
1684      nuh.nickptr  = NULL;
1685      nuh.userptr  = block_state.user.buf;
1686      nuh.hostptr  = block_state.host.buf;
# Line 1665 | Line 1704 | auth_entry: IRCD_AUTH
1704      conf_add_class_to_conf(conf, block_state.class.buf);
1705      add_conf_by_address(CONF_CLIENT, conf);
1706    }
1707 < };
1707 > };
1708  
1709   auth_items:     auth_items auth_item | auth_item;
1710 < auth_item:      auth_user | auth_passwd | auth_class | auth_flags |
1711 <                auth_spoof | auth_redir_serv | auth_redir_port |
1712 <                auth_encrypted | error ';' ;
1710 > auth_item:      auth_user |
1711 >                auth_passwd |
1712 >                auth_class |
1713 >                auth_flags |
1714 >                auth_spoof |
1715 >                auth_redir_serv |
1716 >                auth_redir_port |
1717 >                auth_encrypted |
1718 >                error ';' ;
1719  
1720   auth_user: USER '=' QSTRING ';'
1721   {
# Line 1720 | Line 1765 | auth_flags_item: SPOOF_NOTICE
1765   {
1766    if (conf_parser_ctx.pass == 2)
1767      block_state.flags.value |= CONF_FLAGS_EXEMPTKLINE;
1768 + } | XLINE_EXEMPT
1769 + {
1770 +  if (conf_parser_ctx.pass == 2)
1771 +    block_state.flags.value |= CONF_FLAGS_EXEMPTXLINE;
1772   } | NEED_IDENT
1773   {
1774    if (conf_parser_ctx.pass == 2)
# Line 1732 | Line 1781 | auth_flags_item: SPOOF_NOTICE
1781   {
1782    if (conf_parser_ctx.pass == 2)
1783      block_state.flags.value |= CONF_FLAGS_NO_TILDE;
1735 } | GLINE_EXEMPT
1736 {
1737  if (conf_parser_ctx.pass == 2)
1738    block_state.flags.value |= CONF_FLAGS_EXEMPTGLINE;
1784   } | RESV_EXEMPT
1785   {
1786    if (conf_parser_ctx.pass == 2)
# Line 1750 | Line 1795 | auth_flags_item: SPOOF_NOTICE
1795      block_state.flags.value |= CONF_FLAGS_NEED_PASSWORD;
1796   };
1797  
1798 < auth_spoof: SPOOF '=' QSTRING ';'
1798 > auth_spoof: SPOOF '=' QSTRING ';'
1799   {
1800    if (conf_parser_ctx.pass != 2)
1801      break;
1802  
1803 <  if (strlen(yylval.string) <= HOSTLEN && valid_hostname(yylval.string))
1803 >  if (valid_hostname(yylval.string))
1804    {
1805      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
1806      block_state.flags.value |= CONF_FLAGS_SPOOF_IP;
# Line 1784 | Line 1829 | auth_redir_port: REDIRPORT '=' NUMBER ';
1829  
1830  
1831   /***************************************************************************
1832 < *  section resv
1832 > * resv {} section
1833   ***************************************************************************/
1834   resv_entry: RESV
1835   {
# Line 1798 | Line 1843 | resv_entry: RESV
1843    if (conf_parser_ctx.pass != 2)
1844      break;
1845  
1846 <  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1846 >  resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1847   };
1848  
1849 < resv_items:     resv_items resv_item | resv_item;
1850 < resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1849 > resv_items:     resv_items resv_item | resv_item;
1850 > resv_item:      resv_mask | resv_reason | resv_exempt | error ';' ;
1851  
1852   resv_mask: MASK '=' QSTRING ';'
1853   {
# Line 1824 | Line 1869 | resv_exempt: EXEMPT '=' QSTRING ';'
1869  
1870  
1871   /***************************************************************************
1872 < *  section service
1872 > * service {} section
1873   ***************************************************************************/
1874   service_entry: T_SERVICE '{' service_items '}' ';';
1875  
# Line 1838 | Line 1883 | service_name: NAME '=' QSTRING ';'
1883  
1884    if (valid_servname(yylval.string))
1885    {
1886 <    struct MaskItem *conf = conf_make(CONF_SERVICE);
1887 <    conf->name = xstrdup(yylval.string);
1886 >    struct ServiceItem *service = service_make();
1887 >    service->name = xstrdup(yylval.string);
1888    }
1889   };
1890  
1891 +
1892   /***************************************************************************
1893 < *  section shared, for sharing remote klines etc.
1893 > * shared {} section, for sharing remote klines etc.
1894   ***************************************************************************/
1895   shared_entry: T_SHARED
1896   {
# Line 1859 | Line 1905 | shared_entry: T_SHARED
1905    block_state.flags.value = SHARED_ALL;
1906   } '{' shared_items '}' ';'
1907   {
1862  struct MaskItem *conf = NULL;
1863
1908    if (conf_parser_ctx.pass != 2)
1909      break;
1910  
1911 <  conf = conf_make(CONF_ULINE);
1912 <  conf->flags = block_state.flags.value;
1913 <  conf->name = xstrdup(block_state.name.buf);
1914 <  conf->user = xstrdup(block_state.user.buf);
1915 <  conf->host = xstrdup(block_state.host.buf);
1911 >  struct SharedItem *shared = shared_make();
1912 >  shared->type = block_state.flags.value;
1913 >  shared->server = xstrdup(block_state.name.buf);
1914 >  shared->user = xstrdup(block_state.user.buf);
1915 >  shared->host = xstrdup(block_state.host.buf);
1916   };
1917  
1918   shared_items: shared_items shared_item | shared_item;
# Line 1948 | Line 1992 | shared_type_item: KLINE
1992      block_state.flags.value = SHARED_ALL;
1993   };
1994  
1995 +
1996   /***************************************************************************
1997 < *  section cluster
1997 > * cluster {} section
1998   ***************************************************************************/
1999   cluster_entry: T_CLUSTER
2000   {
# Line 1959 | Line 2004 | cluster_entry: T_CLUSTER
2004    reset_block_state();
2005  
2006    strlcpy(block_state.name.buf, "*", sizeof(block_state.name.buf));
2007 <  block_state.flags.value = SHARED_ALL;
2007 >  block_state.flags.value = CLUSTER_ALL;
2008   } '{' cluster_items '}' ';'
2009   {
1965  struct MaskItem *conf = NULL;
1966
2010    if (conf_parser_ctx.pass != 2)
2011      break;
2012  
2013 <  conf = conf_make(CONF_CLUSTER);
2014 <  conf->flags = block_state.flags.value;
2015 <  conf->name = xstrdup(block_state.name.buf);
2013 >  struct ClusterItem *cluster = cluster_make();
2014 >  cluster->type = block_state.flags.value;
2015 >  cluster->server = xstrdup(block_state.name.buf);
2016   };
2017  
2018 < cluster_items:  cluster_items cluster_item | cluster_item;
2019 < cluster_item:   cluster_name | cluster_type | error ';' ;
2018 > cluster_items:  cluster_items cluster_item | cluster_item;
2019 > cluster_item:   cluster_name | cluster_type | error ';' ;
2020  
2021   cluster_name: NAME '=' QSTRING ';'
2022   {
# Line 1987 | Line 2030 | cluster_type: TYPE
2030      block_state.flags.value = 0;
2031   } '=' cluster_types ';' ;
2032  
2033 < cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
2033 > cluster_types:  cluster_types ',' cluster_type_item | cluster_type_item;
2034   cluster_type_item: KLINE
2035   {
2036    if (conf_parser_ctx.pass == 2)
2037 <    block_state.flags.value |= SHARED_KLINE;
2037 >    block_state.flags.value |= CLUSTER_KLINE;
2038   } | UNKLINE
2039   {
2040    if (conf_parser_ctx.pass == 2)
2041 <    block_state.flags.value |= SHARED_UNKLINE;
2041 >    block_state.flags.value |= CLUSTER_UNKLINE;
2042   } | T_DLINE
2043   {
2044    if (conf_parser_ctx.pass == 2)
2045 <    block_state.flags.value |= SHARED_DLINE;
2045 >    block_state.flags.value |= CLUSTER_DLINE;
2046   } | T_UNDLINE
2047   {
2048    if (conf_parser_ctx.pass == 2)
2049 <    block_state.flags.value |= SHARED_UNDLINE;
2049 >    block_state.flags.value |= CLUSTER_UNDLINE;
2050   } | XLINE
2051   {
2052    if (conf_parser_ctx.pass == 2)
2053 <    block_state.flags.value |= SHARED_XLINE;
2053 >    block_state.flags.value |= CLUSTER_XLINE;
2054   } | T_UNXLINE
2055   {
2056    if (conf_parser_ctx.pass == 2)
2057 <    block_state.flags.value |= SHARED_UNXLINE;
2057 >    block_state.flags.value |= CLUSTER_UNXLINE;
2058   } | RESV
2059   {
2060    if (conf_parser_ctx.pass == 2)
2061 <    block_state.flags.value |= SHARED_RESV;
2061 >    block_state.flags.value |= CLUSTER_RESV;
2062   } | T_UNRESV
2063   {
2064    if (conf_parser_ctx.pass == 2)
2065 <    block_state.flags.value |= SHARED_UNRESV;
2065 >    block_state.flags.value |= CLUSTER_UNRESV;
2066   } | T_LOCOPS
2067   {
2068    if (conf_parser_ctx.pass == 2)
2069 <    block_state.flags.value |= SHARED_LOCOPS;
2069 >    block_state.flags.value |= CLUSTER_LOCOPS;
2070   } | T_ALL
2071   {
2072    if (conf_parser_ctx.pass == 2)
2073 <    block_state.flags.value = SHARED_ALL;
2073 >    block_state.flags.value = CLUSTER_ALL;
2074   };
2075  
2076 +
2077   /***************************************************************************
2078 < *  section connect
2078 > * connect {}  section
2079   ***************************************************************************/
2080 < connect_entry: CONNECT  
2080 > connect_entry: CONNECT
2081   {
2082  
2083    if (conf_parser_ctx.pass != 2)
2084      break;
2085  
2086    reset_block_state();
2087 +  block_state.aftype.value = AF_INET;
2088    block_state.port.value = PORTNUM;
2089   } '{' connect_items '}' ';'
2090   {
# Line 2091 | Line 2136 | connect_entry: CONNECT
2136        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf);
2137      else
2138      {
2139 <      assert(res != NULL);
2139 >      assert(res);
2140  
2141        memcpy(&conf->bind, res->ai_addr, res->ai_addrlen);
2142        conf->bind.ss.ss_family = res->ai_family;
# Line 2105 | Line 2150 | connect_entry: CONNECT
2150   };
2151  
2152   connect_items:  connect_items connect_item | connect_item;
2153 < connect_item:   connect_name | connect_host | connect_vhost |
2154 <                connect_send_password | connect_accept_password |
2155 <                connect_ssl_certificate_fingerprint |
2156 <                connect_aftype | connect_port | connect_ssl_cipher_list |
2157 <                connect_flags | connect_hub_mask | connect_leaf_mask |
2158 <                connect_class | connect_encrypted |
2153 > connect_item:   connect_name |
2154 >                connect_host |
2155 >                connect_vhost |
2156 >                connect_send_password |
2157 >                connect_accept_password |
2158 >                connect_ssl_certificate_fingerprint |
2159 >                connect_aftype |
2160 >                connect_port |
2161 >                connect_ssl_cipher_list |
2162 >                connect_flags |
2163 >                connect_hub_mask |
2164 >                connect_leaf_mask |
2165 >                connect_class |
2166 >                connect_encrypted |
2167                  error ';' ;
2168  
2169   connect_name: NAME '=' QSTRING ';'
# Line 2119 | Line 2172 | connect_name: NAME '=' QSTRING ';'
2172      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2173   };
2174  
2175 < connect_host: HOST '=' QSTRING ';'
2175 > connect_host: HOST '=' QSTRING ';'
2176   {
2177    if (conf_parser_ctx.pass == 2)
2178      strlcpy(block_state.host.buf, yylval.string, sizeof(block_state.host.buf));
2179   };
2180  
2181 < connect_vhost: VHOST '=' QSTRING ';'
2181 > connect_vhost: VHOST '=' QSTRING ';'
2182   {
2183    if (conf_parser_ctx.pass == 2)
2184      strlcpy(block_state.bind.buf, yylval.string, sizeof(block_state.bind.buf));
2185   };
2186 <
2186 >
2187   connect_send_password: SEND_PASSWORD '=' QSTRING ';'
2188   {
2189    if (conf_parser_ctx.pass != 2)
# Line 2138 | Line 2191 | connect_send_password: SEND_PASSWORD '='
2191  
2192    if ($3[0] == ':')
2193      conf_error_report("Server passwords cannot begin with a colon");
2194 <  else if (strchr($3, ' ') != NULL)
2194 >  else if (strchr($3, ' '))
2195      conf_error_report("Server passwords cannot contain spaces");
2196    else
2197      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
# Line 2151 | Line 2204 | connect_accept_password: ACCEPT_PASSWORD
2204  
2205    if ($3[0] == ':')
2206      conf_error_report("Server passwords cannot begin with a colon");
2207 <  else if (strchr($3, ' ') != NULL)
2207 >  else if (strchr($3, ' '))
2208      conf_error_report("Server passwords cannot contain spaces");
2209    else
2210      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
# Line 2175 | Line 2228 | connect_aftype: AFTYPE '=' T_IPV4 ';'
2228      block_state.aftype.value = AF_INET;
2229   } | AFTYPE '=' T_IPV6 ';'
2230   {
2178 #ifdef IPV6
2231    if (conf_parser_ctx.pass == 2)
2232      block_state.aftype.value = AF_INET6;
2181 #endif
2233   };
2234  
2235   connect_flags: IRCD_FLAGS
# Line 2208 | Line 2259 | connect_encrypted: ENCRYPTED '=' TBOOL '
2259    }
2260   };
2261  
2262 < connect_hub_mask: HUB_MASK '=' QSTRING ';'
2262 > connect_hub_mask: HUB_MASK '=' QSTRING ';'
2263   {
2264    if (conf_parser_ctx.pass == 2)
2265      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.hub.list);
2266   };
2267  
2268 < connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2268 > connect_leaf_mask: LEAF_MASK '=' QSTRING ';'
2269   {
2270    if (conf_parser_ctx.pass == 2)
2271      dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.leaf.list);
# Line 2228 | Line 2279 | connect_class: CLASS '=' QSTRING ';'
2279  
2280   connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
2281   {
2282 < #ifdef HAVE_LIBCRYPTO
2282 > #ifdef HAVE_TLS
2283    if (conf_parser_ctx.pass == 2)
2284      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2285   #else
2286    if (conf_parser_ctx.pass == 2)
2287 <    conf_error_report("Ignoring connect::ciphers -- no OpenSSL support");
2287 >    conf_error_report("Ignoring connect::ciphers -- no TLS support");
2288   #endif
2289   };
2290  
2291  
2292   /***************************************************************************
2293 < *  section kill
2293 > * kill {} section
2294   ***************************************************************************/
2295   kill_entry: KILL
2296   {
# Line 2265 | Line 2316 | kill_entry: KILL
2316    else
2317      conf->reason = xstrdup(CONF_NOREASON);
2318    add_conf_by_address(CONF_KLINE, conf);
2319 < };
2319 > };
2320  
2321   kill_items:     kill_items kill_item | kill_item;
2322   kill_item:      kill_user | kill_reason | error;
# Line 2290 | Line 2341 | kill_user: USER '=' QSTRING ';'
2341    }
2342   };
2343  
2344 < kill_reason: REASON '=' QSTRING ';'
2344 > kill_reason: REASON '=' QSTRING ';'
2345   {
2346    if (conf_parser_ctx.pass == 2)
2347      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2348   };
2349  
2350 +
2351   /***************************************************************************
2352 < *  section deny
2352 > * deny {} section
2353   ***************************************************************************/
2354 < deny_entry: DENY
2354 > deny_entry: DENY
2355   {
2356    if (conf_parser_ctx.pass == 2)
2357      reset_block_state();
# Line 2324 | Line 2376 | deny_entry: DENY
2376        conf->reason = xstrdup(CONF_NOREASON);
2377      add_conf_by_address(CONF_DLINE, conf);
2378    }
2379 < };
2379 > };
2380  
2381   deny_items:     deny_items deny_item | deny_item;
2382   deny_item:      deny_ip | deny_reason | error;
# Line 2335 | Line 2387 | deny_ip: IP '=' QSTRING ';'
2387      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
2388   };
2389  
2390 < deny_reason: REASON '=' QSTRING ';'
2390 > deny_reason: REASON '=' QSTRING ';'
2391   {
2392    if (conf_parser_ctx.pass == 2)
2393      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2394   };
2395  
2396 +
2397   /***************************************************************************
2398 < *  section exempt
2398 > * exempt {} section
2399   ***************************************************************************/
2400   exempt_entry: EXEMPT '{' exempt_items '}' ';';
2401  
2402 < exempt_items:     exempt_items exempt_item | exempt_item;
2403 < exempt_item:      exempt_ip | error;
2402 > exempt_items: exempt_items exempt_item | exempt_item;
2403 > exempt_item:  exempt_ip | error;
2404  
2405   exempt_ip: IP '=' QSTRING ';'
2406   {
2407    if (conf_parser_ctx.pass == 2)
2408    {
2409 <    if (yylval.string[0] && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2409 >    if (*yylval.string && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2410      {
2411        struct MaskItem *conf = conf_make(CONF_EXEMPT);
2412        conf->host = xstrdup(yylval.string);
# Line 2364 | Line 2417 | exempt_ip: IP '=' QSTRING ';'
2417   };
2418  
2419   /***************************************************************************
2420 < *  section gecos
2420 > * gecos {} section
2421   ***************************************************************************/
2422   gecos_entry: GECOS
2423   {
# Line 2372 | Line 2425 | gecos_entry: GECOS
2425      reset_block_state();
2426   } '{' gecos_items '}' ';'
2427   {
2375  struct MaskItem *conf = NULL;
2376
2428    if (conf_parser_ctx.pass != 2)
2429      break;
2430  
2431    if (!block_state.name.buf[0])
2432      break;
2433  
2434 <  conf = conf_make(CONF_XLINE);
2435 <  conf->name = xstrdup(block_state.name.buf);
2434 >  struct GecosItem *gecos = gecos_make();
2435 >  gecos->mask = xstrdup(block_state.name.buf);
2436  
2437    if (block_state.rpass.buf[0])
2438 <    conf->reason = xstrdup(block_state.rpass.buf);
2438 >    gecos->reason = xstrdup(block_state.rpass.buf);
2439    else
2440 <    conf->reason = xstrdup(CONF_NOREASON);
2440 >    gecos->reason = xstrdup(CONF_NOREASON);
2441   };
2442  
2443   gecos_items: gecos_items gecos_item | gecos_item;
2444   gecos_item:  gecos_name | gecos_reason | error;
2445  
2446 < gecos_name: NAME '=' QSTRING ';'
2446 > gecos_name: NAME '=' QSTRING ';'
2447   {
2448    if (conf_parser_ctx.pass == 2)
2449      strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf));
2450   };
2451  
2452 < gecos_reason: REASON '=' QSTRING ';'
2452 > gecos_reason: REASON '=' QSTRING ';'
2453   {
2454    if (conf_parser_ctx.pass == 2)
2455      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2456   };
2457  
2458 +
2459   /***************************************************************************
2460 < *  section general
2460 > * general {} section
2461   ***************************************************************************/
2462 < general_entry: GENERAL
2411 <  '{' general_items '}' ';';
2462 > general_entry: GENERAL '{' general_items '}' ';';
2463  
2464   general_items:      general_items general_item | general_item;
2465 < general_item:       general_hide_spoof_ips | general_ignore_bogus_ts |
2466 <                    general_failed_oper_notice | general_anti_nick_flood |
2467 <                    general_max_nick_time | general_max_nick_changes |
2468 <                    general_max_accept | general_anti_spam_exit_message_time |
2469 <                    general_ts_warn_delta | general_ts_max_delta |
2465 > general_item:       general_away_count |
2466 >                    general_away_time |
2467 >                    general_ignore_bogus_ts |
2468 >                    general_failed_oper_notice |
2469 >                    general_anti_nick_flood |
2470 >                    general_max_nick_time |
2471 >                    general_max_nick_changes |
2472 >                    general_max_accept |
2473 >                    general_whowas_history_length |
2474 >                    general_anti_spam_exit_message_time |
2475 >                    general_ts_warn_delta |
2476 >                    general_ts_max_delta |
2477                      general_kill_chase_time_limit |
2478                      general_invisible_on_connect |
2479 <                    general_warn_no_nline | general_dots_in_ident |
2480 <                    general_stats_o_oper_only | general_stats_k_oper_only |
2481 <                    general_pace_wait | general_stats_i_oper_only |
2482 <                    general_pace_wait_simple | general_stats_P_oper_only |
2483 <                    general_short_motd | general_no_oper_flood |
2484 <                    general_true_no_oper_flood | general_oper_pass_resv |
2485 <                    general_oper_only_umodes | general_max_targets |
2486 <                    general_use_egd | general_egdpool_path |
2487 <                    general_oper_umodes | general_caller_id_wait |
2488 <                    general_opers_bypass_callerid | general_default_floodcount |
2489 <                    general_min_nonwildcard | general_min_nonwildcard_simple |
2490 <                    general_throttle_time | general_havent_read_conf |
2479 >                    general_warn_no_connect_block |
2480 >                    general_dots_in_ident |
2481 >                    general_stats_i_oper_only |
2482 >                    general_stats_k_oper_only |
2483 >                    general_stats_m_oper_only |
2484 >                    general_stats_o_oper_only |
2485 >                    general_stats_P_oper_only |
2486 >                    general_stats_u_oper_only |
2487 >                    general_pace_wait |
2488 >                    general_pace_wait_simple |
2489 >                    general_short_motd |
2490 >                    general_no_oper_flood |
2491 >                    general_oper_only_umodes |
2492 >                    general_max_targets |
2493 >                    general_oper_umodes |
2494 >                    general_caller_id_wait |
2495 >                    general_opers_bypass_callerid |
2496 >                    general_default_floodcount |
2497 >                    general_min_nonwildcard |
2498 >                    general_min_nonwildcard_simple |
2499 >                    general_throttle_count |
2500 >                    general_throttle_time |
2501                      general_ping_cookie |
2502 <                    general_disable_auth |
2503 <                    general_tkline_expire_notices | general_gline_enable |
2504 <                    general_gline_duration | general_gline_request_duration |
2505 <                    general_gline_min_cidr |
2506 <                    general_gline_min_cidr6 |
2507 <                    general_stats_e_disabled |
2508 <                    general_max_watch | general_services_name |
2509 <                    error;
2502 >                    general_disable_auth |
2503 >                    general_tkline_expire_notices |
2504 >                    general_dline_min_cidr |
2505 >                    general_dline_min_cidr6 |
2506 >                    general_kline_min_cidr |
2507 >                    general_kline_min_cidr6 |
2508 >                    general_stats_e_disabled |
2509 >                    general_max_watch |
2510 >                    general_cycle_on_host_change |
2511 >                    error;
2512 >
2513  
2514 + general_away_count: AWAY_COUNT '=' NUMBER ';'
2515 + {
2516 +  ConfigGeneral.away_count = $3;
2517 + };
2518 +
2519 + general_away_time: AWAY_TIME '=' timespec ';'
2520 + {
2521 +  ConfigGeneral.away_time = $3;
2522 + };
2523  
2524   general_max_watch: MAX_WATCH '=' NUMBER ';'
2525   {
2526 <  ConfigFileEntry.max_watch = $3;
2526 >  ConfigGeneral.max_watch = $3;
2527   };
2528  
2529 < general_gline_enable: GLINE_ENABLE '=' TBOOL ';'
2529 > general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';'
2530   {
2531 <  if (conf_parser_ctx.pass == 2)
2452 <    ConfigFileEntry.glines = yylval.number;
2531 >  ConfigGeneral.whowas_history_length = $3;
2532   };
2533  
2534 < general_gline_duration: GLINE_DURATION '=' timespec ';'
2534 > general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2535   {
2536    if (conf_parser_ctx.pass == 2)
2537 <    ConfigFileEntry.gline_time = $3;
2537 >    ConfigGeneral.cycle_on_host_change = yylval.number;
2538   };
2539  
2540 < general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';'
2540 > general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';'
2541   {
2542 <  if (conf_parser_ctx.pass == 2)
2464 <    ConfigFileEntry.gline_request_time = $3;
2542 >  ConfigGeneral.dline_min_cidr = $3;
2543   };
2544  
2545 < general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';'
2545 > general_dline_min_cidr6: DLINE_MIN_CIDR6 '=' NUMBER ';'
2546   {
2547 <  ConfigFileEntry.gline_min_cidr = $3;
2547 >  ConfigGeneral.dline_min_cidr6 = $3;
2548   };
2549  
2550 < general_gline_min_cidr6: GLINE_MIN_CIDR6 '=' NUMBER ';'
2550 > general_kline_min_cidr: KLINE_MIN_CIDR '=' NUMBER ';'
2551   {
2552 <  ConfigFileEntry.gline_min_cidr6 = $3;
2552 >  ConfigGeneral.kline_min_cidr = $3;
2553   };
2554  
2555 < general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2555 > general_kline_min_cidr6: KLINE_MIN_CIDR6 '=' NUMBER ';'
2556   {
2557 <  ConfigFileEntry.tkline_expire_notices = yylval.number;
2557 >  ConfigGeneral.kline_min_cidr6 = $3;
2558   };
2559  
2560 < general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2560 > general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';'
2561   {
2562 <  ConfigFileEntry.kill_chase_time_limit = $3;
2562 >  ConfigGeneral.tkline_expire_notices = yylval.number;
2563   };
2564  
2565 < general_hide_spoof_ips: HIDE_SPOOF_IPS '=' TBOOL ';'
2565 > general_kill_chase_time_limit: KILL_CHASE_TIME_LIMIT '=' timespec ';'
2566   {
2567 <  ConfigFileEntry.hide_spoof_ips = yylval.number;
2567 >  ConfigGeneral.kill_chase_time_limit = $3;
2568   };
2569  
2570   general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';'
2571   {
2572 <  ConfigFileEntry.ignore_bogus_ts = yylval.number;
2572 >  ConfigGeneral.ignore_bogus_ts = yylval.number;
2573   };
2574  
2575   general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';'
2576   {
2577 <  ConfigFileEntry.failed_oper_notice = yylval.number;
2577 >  ConfigGeneral.failed_oper_notice = yylval.number;
2578   };
2579  
2580   general_anti_nick_flood: ANTI_NICK_FLOOD '=' TBOOL ';'
2581   {
2582 <  ConfigFileEntry.anti_nick_flood = yylval.number;
2582 >  ConfigGeneral.anti_nick_flood = yylval.number;
2583   };
2584  
2585   general_max_nick_time: MAX_NICK_TIME '=' timespec ';'
2586   {
2587 <  ConfigFileEntry.max_nick_time = $3;
2587 >  ConfigGeneral.max_nick_time = $3;
2588   };
2589  
2590   general_max_nick_changes: MAX_NICK_CHANGES '=' NUMBER ';'
2591   {
2592 <  ConfigFileEntry.max_nick_changes = $3;
2592 >  ConfigGeneral.max_nick_changes = $3;
2593   };
2594  
2595   general_max_accept: MAX_ACCEPT '=' NUMBER ';'
2596   {
2597 <  ConfigFileEntry.max_accept = $3;
2597 >  ConfigGeneral.max_accept = $3;
2598   };
2599  
2600   general_anti_spam_exit_message_time: ANTI_SPAM_EXIT_MESSAGE_TIME '=' timespec ';'
2601   {
2602 <  ConfigFileEntry.anti_spam_exit_message_time = $3;
2602 >  ConfigGeneral.anti_spam_exit_message_time = $3;
2603   };
2604  
2605   general_ts_warn_delta: TS_WARN_DELTA '=' timespec ';'
2606   {
2607 <  ConfigFileEntry.ts_warn_delta = $3;
2607 >  ConfigGeneral.ts_warn_delta = $3;
2608   };
2609  
2610   general_ts_max_delta: TS_MAX_DELTA '=' timespec ';'
2611   {
2612    if (conf_parser_ctx.pass == 2)
2613 <    ConfigFileEntry.ts_max_delta = $3;
2613 >    ConfigGeneral.ts_max_delta = $3;
2614   };
2615  
2616 < general_havent_read_conf: HAVENT_READ_CONF '=' NUMBER ';'
2616 > general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2617   {
2618 <  if (($3 > 0) && conf_parser_ctx.pass == 1)
2541 <  {
2542 <    ilog(LOG_TYPE_IRCD, "You haven't read your config file properly.");
2543 <    ilog(LOG_TYPE_IRCD, "There is a line in the example conf that will kill your server if not removed.");
2544 <    ilog(LOG_TYPE_IRCD, "Consider actually reading/editing the conf file, and removing this line.");
2545 <    exit(0);
2546 <  }
2618 >  ConfigGeneral.invisible_on_connect = yylval.number;
2619   };
2620  
2621 < general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';'
2621 > general_warn_no_connect_block: WARN_NO_CONNECT_BLOCK '=' TBOOL ';'
2622   {
2623 <  ConfigFileEntry.invisible_on_connect = yylval.number;
2623 >  ConfigGeneral.warn_no_connect_block = yylval.number;
2624   };
2625  
2626 < general_warn_no_nline: WARN_NO_NLINE '=' TBOOL ';'
2626 > general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2627   {
2628 <  ConfigFileEntry.warn_no_nline = yylval.number;
2628 >  ConfigGeneral.stats_e_disabled = yylval.number;
2629   };
2630  
2631 < general_stats_e_disabled: STATS_E_DISABLED '=' TBOOL ';'
2631 > general_stats_m_oper_only: STATS_M_OPER_ONLY '=' TBOOL ';'
2632   {
2633 <  ConfigFileEntry.stats_e_disabled = yylval.number;
2633 >  ConfigGeneral.stats_m_oper_only = yylval.number;
2634   };
2635  
2636   general_stats_o_oper_only: STATS_O_OPER_ONLY '=' TBOOL ';'
2637   {
2638 <  ConfigFileEntry.stats_o_oper_only = yylval.number;
2638 >  ConfigGeneral.stats_o_oper_only = yylval.number;
2639   };
2640  
2641   general_stats_P_oper_only: STATS_P_OPER_ONLY '=' TBOOL ';'
2642   {
2643 <  ConfigFileEntry.stats_P_oper_only = yylval.number;
2643 >  ConfigGeneral.stats_P_oper_only = yylval.number;
2644 > };
2645 >
2646 > general_stats_u_oper_only: STATS_U_OPER_ONLY '=' TBOOL ';'
2647 > {
2648 >  ConfigGeneral.stats_u_oper_only = yylval.number;
2649   };
2650  
2651   general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';'
2652   {
2653 <  ConfigFileEntry.stats_k_oper_only = 2 * yylval.number;
2653 >  ConfigGeneral.stats_k_oper_only = 2 * yylval.number;
2654   } | STATS_K_OPER_ONLY '=' TMASKED ';'
2655   {
2656 <  ConfigFileEntry.stats_k_oper_only = 1;
2656 >  ConfigGeneral.stats_k_oper_only = 1;
2657   };
2658  
2659   general_stats_i_oper_only: STATS_I_OPER_ONLY '=' TBOOL ';'
2660   {
2661 <  ConfigFileEntry.stats_i_oper_only = 2 * yylval.number;
2661 >  ConfigGeneral.stats_i_oper_only = 2 * yylval.number;
2662   } | STATS_I_OPER_ONLY '=' TMASKED ';'
2663   {
2664 <  ConfigFileEntry.stats_i_oper_only = 1;
2664 >  ConfigGeneral.stats_i_oper_only = 1;
2665   };
2666  
2667   general_pace_wait: PACE_WAIT '=' timespec ';'
2668   {
2669 <  ConfigFileEntry.pace_wait = $3;
2669 >  ConfigGeneral.pace_wait = $3;
2670   };
2671  
2672   general_caller_id_wait: CALLER_ID_WAIT '=' timespec ';'
2673   {
2674 <  ConfigFileEntry.caller_id_wait = $3;
2674 >  ConfigGeneral.caller_id_wait = $3;
2675   };
2676  
2677   general_opers_bypass_callerid: OPERS_BYPASS_CALLERID '=' TBOOL ';'
2678   {
2679 <  ConfigFileEntry.opers_bypass_callerid = yylval.number;
2679 >  ConfigGeneral.opers_bypass_callerid = yylval.number;
2680   };
2681  
2682   general_pace_wait_simple: PACE_WAIT_SIMPLE '=' timespec ';'
2683   {
2684 <  ConfigFileEntry.pace_wait_simple = $3;
2684 >  ConfigGeneral.pace_wait_simple = $3;
2685   };
2686  
2687   general_short_motd: SHORT_MOTD '=' TBOOL ';'
2688   {
2689 <  ConfigFileEntry.short_motd = yylval.number;
2613 < };
2614 <  
2615 < general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2616 < {
2617 <  ConfigFileEntry.no_oper_flood = yylval.number;
2618 < };
2619 <
2620 < general_true_no_oper_flood: TRUE_NO_OPER_FLOOD '=' TBOOL ';'
2621 < {
2622 <  ConfigFileEntry.true_no_oper_flood = yylval.number;
2689 >  ConfigGeneral.short_motd = yylval.number;
2690   };
2691  
2692 < general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';'
2692 > general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';'
2693   {
2694 <  ConfigFileEntry.oper_pass_resv = yylval.number;
2694 >  ConfigGeneral.no_oper_flood = yylval.number;
2695   };
2696  
2697   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2698   {
2699 <  ConfigFileEntry.dots_in_ident = $3;
2699 >  ConfigGeneral.dots_in_ident = $3;
2700   };
2701  
2702   general_max_targets: MAX_TARGETS '=' NUMBER ';'
2703   {
2704 <  ConfigFileEntry.max_targets = $3;
2704 >  ConfigGeneral.max_targets = $3;
2705   };
2706  
2707 < general_use_egd: USE_EGD '=' TBOOL ';'
2707 > general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2708   {
2709 <  ConfigFileEntry.use_egd = yylval.number;
2709 >  ConfigGeneral.ping_cookie = yylval.number;
2710   };
2711  
2712 < general_egdpool_path: EGDPOOL_PATH '=' QSTRING ';'
2646 < {
2647 <  if (conf_parser_ctx.pass == 2)
2648 <  {
2649 <    MyFree(ConfigFileEntry.egdpool_path);
2650 <    ConfigFileEntry.egdpool_path = xstrdup(yylval.string);
2651 <  }
2652 < };
2653 <
2654 < general_services_name: T_SERVICES_NAME '=' QSTRING ';'
2712 > general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2713   {
2714 <  if (conf_parser_ctx.pass == 2 && valid_servname(yylval.string))
2657 <  {
2658 <    MyFree(ConfigFileEntry.service_name);
2659 <    ConfigFileEntry.service_name = xstrdup(yylval.string);
2660 <  }
2714 >  ConfigGeneral.disable_auth = yylval.number;
2715   };
2716  
2717 < general_ping_cookie: PING_COOKIE '=' TBOOL ';'
2717 > general_throttle_count: THROTTLE_COUNT '=' NUMBER ';'
2718   {
2719 <  ConfigFileEntry.ping_cookie = yylval.number;
2666 < };
2667 <
2668 < general_disable_auth: DISABLE_AUTH '=' TBOOL ';'
2669 < {
2670 <  ConfigFileEntry.disable_auth = yylval.number;
2719 >  ConfigGeneral.throttle_count = $3;
2720   };
2721  
2722   general_throttle_time: THROTTLE_TIME '=' timespec ';'
2723   {
2724 <  ConfigFileEntry.throttle_time = yylval.number;
2724 >  ConfigGeneral.throttle_time = $3;
2725   };
2726  
2727   general_oper_umodes: OPER_UMODES
2728   {
2729 <  ConfigFileEntry.oper_umodes = 0;
2729 >  ConfigGeneral.oper_umodes = 0;
2730   } '='  umode_oitems ';' ;
2731  
2732   umode_oitems:    umode_oitems ',' umode_oitem | umode_oitem;
2733   umode_oitem:     T_BOTS
2734   {
2735 <  ConfigFileEntry.oper_umodes |= UMODE_BOTS;
2735 >  ConfigGeneral.oper_umodes |= UMODE_BOTS;
2736   } | T_CCONN
2737   {
2738 <  ConfigFileEntry.oper_umodes |= UMODE_CCONN;
2738 >  ConfigGeneral.oper_umodes |= UMODE_CCONN;
2739   } | T_DEAF
2740   {
2741 <  ConfigFileEntry.oper_umodes |= UMODE_DEAF;
2741 >  ConfigGeneral.oper_umodes |= UMODE_DEAF;
2742   } | T_DEBUG
2743   {
2744 <  ConfigFileEntry.oper_umodes |= UMODE_DEBUG;
2744 >  ConfigGeneral.oper_umodes |= UMODE_DEBUG;
2745   } | T_FULL
2746   {
2747 <  ConfigFileEntry.oper_umodes |= UMODE_FULL;
2747 >  ConfigGeneral.oper_umodes |= UMODE_FULL;
2748   } | HIDDEN
2749   {
2750 <  ConfigFileEntry.oper_umodes |= UMODE_HIDDEN;
2750 >  ConfigGeneral.oper_umodes |= UMODE_HIDDEN;
2751 > } | HIDE_CHANS
2752 > {
2753 >  ConfigGeneral.oper_umodes |= UMODE_HIDECHANS;
2754 > } | HIDE_IDLE
2755 > {
2756 >  ConfigGeneral.oper_umodes |= UMODE_HIDEIDLE;
2757   } | T_SKILL
2758   {
2759 <  ConfigFileEntry.oper_umodes |= UMODE_SKILL;
2759 >  ConfigGeneral.oper_umodes |= UMODE_SKILL;
2760   } | T_NCHANGE
2761   {
2762 <  ConfigFileEntry.oper_umodes |= UMODE_NCHANGE;
2762 >  ConfigGeneral.oper_umodes |= UMODE_NCHANGE;
2763   } | T_REJ
2764   {
2765 <  ConfigFileEntry.oper_umodes |= UMODE_REJ;
2765 >  ConfigGeneral.oper_umodes |= UMODE_REJ;
2766   } | T_UNAUTH
2767   {
2768 <  ConfigFileEntry.oper_umodes |= UMODE_UNAUTH;
2768 >  ConfigGeneral.oper_umodes |= UMODE_UNAUTH;
2769   } | T_SPY
2770   {
2771 <  ConfigFileEntry.oper_umodes |= UMODE_SPY;
2771 >  ConfigGeneral.oper_umodes |= UMODE_SPY;
2772   } | T_EXTERNAL
2773   {
2774 <  ConfigFileEntry.oper_umodes |= UMODE_EXTERNAL;
2720 < } | T_OPERWALL
2721 < {
2722 <  ConfigFileEntry.oper_umodes |= UMODE_OPERWALL;
2774 >  ConfigGeneral.oper_umodes |= UMODE_EXTERNAL;
2775   } | T_SERVNOTICE
2776   {
2777 <  ConfigFileEntry.oper_umodes |= UMODE_SERVNOTICE;
2777 >  ConfigGeneral.oper_umodes |= UMODE_SERVNOTICE;
2778   } | T_INVISIBLE
2779   {
2780 <  ConfigFileEntry.oper_umodes |= UMODE_INVISIBLE;
2780 >  ConfigGeneral.oper_umodes |= UMODE_INVISIBLE;
2781   } | T_WALLOP
2782   {
2783 <  ConfigFileEntry.oper_umodes |= UMODE_WALLOP;
2783 >  ConfigGeneral.oper_umodes |= UMODE_WALLOP;
2784   } | T_SOFTCALLERID
2785   {
2786 <  ConfigFileEntry.oper_umodes |= UMODE_SOFTCALLERID;
2786 >  ConfigGeneral.oper_umodes |= UMODE_SOFTCALLERID;
2787   } | T_CALLERID
2788   {
2789 <  ConfigFileEntry.oper_umodes |= UMODE_CALLERID;
2789 >  ConfigGeneral.oper_umodes |= UMODE_CALLERID;
2790   } | T_LOCOPS
2791   {
2792 <  ConfigFileEntry.oper_umodes |= UMODE_LOCOPS;
2792 >  ConfigGeneral.oper_umodes |= UMODE_LOCOPS;
2793   } | T_NONONREG
2794   {
2795 <  ConfigFileEntry.oper_umodes |= UMODE_REGONLY;
2795 >  ConfigGeneral.oper_umodes |= UMODE_REGONLY;
2796   } | T_FARCONNECT
2797   {
2798 <  ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT;
2798 >  ConfigGeneral.oper_umodes |= UMODE_FARCONNECT;
2799   };
2800  
2801 < general_oper_only_umodes: OPER_ONLY_UMODES
2801 > general_oper_only_umodes: OPER_ONLY_UMODES
2802   {
2803 <  ConfigFileEntry.oper_only_umodes = 0;
2803 >  ConfigGeneral.oper_only_umodes = 0;
2804   } '='  umode_items ';' ;
2805  
2806 < umode_items:    umode_items ',' umode_item | umode_item;
2807 < umode_item:     T_BOTS
2806 > umode_items:  umode_items ',' umode_item | umode_item;
2807 > umode_item:   T_BOTS
2808   {
2809 <  ConfigFileEntry.oper_only_umodes |= UMODE_BOTS;
2809 >  ConfigGeneral.oper_only_umodes |= UMODE_BOTS;
2810   } | T_CCONN
2811   {
2812 <  ConfigFileEntry.oper_only_umodes |= UMODE_CCONN;
2812 >  ConfigGeneral.oper_only_umodes |= UMODE_CCONN;
2813   } | T_DEAF
2814   {
2815 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEAF;
2815 >  ConfigGeneral.oper_only_umodes |= UMODE_DEAF;
2816   } | T_DEBUG
2817   {
2818 <  ConfigFileEntry.oper_only_umodes |= UMODE_DEBUG;
2818 >  ConfigGeneral.oper_only_umodes |= UMODE_DEBUG;
2819   } | T_FULL
2820 < {
2821 <  ConfigFileEntry.oper_only_umodes |= UMODE_FULL;
2820 > {
2821 >  ConfigGeneral.oper_only_umodes |= UMODE_FULL;
2822   } | T_SKILL
2823   {
2824 <  ConfigFileEntry.oper_only_umodes |= UMODE_SKILL;
2824 >  ConfigGeneral.oper_only_umodes |= UMODE_SKILL;
2825   } | HIDDEN
2826   {
2827 <  ConfigFileEntry.oper_only_umodes |= UMODE_HIDDEN;
2827 >  ConfigGeneral.oper_only_umodes |= UMODE_HIDDEN;
2828   } | T_NCHANGE
2829   {
2830 <  ConfigFileEntry.oper_only_umodes |= UMODE_NCHANGE;
2830 >  ConfigGeneral.oper_only_umodes |= UMODE_NCHANGE;
2831   } | T_REJ
2832   {
2833 <  ConfigFileEntry.oper_only_umodes |= UMODE_REJ;
2833 >  ConfigGeneral.oper_only_umodes |= UMODE_REJ;
2834   } | T_UNAUTH
2835   {
2836 <  ConfigFileEntry.oper_only_umodes |= UMODE_UNAUTH;
2836 >  ConfigGeneral.oper_only_umodes |= UMODE_UNAUTH;
2837   } | T_SPY
2838   {
2839 <  ConfigFileEntry.oper_only_umodes |= UMODE_SPY;
2839 >  ConfigGeneral.oper_only_umodes |= UMODE_SPY;
2840   } | T_EXTERNAL
2841   {
2842 <  ConfigFileEntry.oper_only_umodes |= UMODE_EXTERNAL;
2791 < } | T_OPERWALL
2792 < {
2793 <  ConfigFileEntry.oper_only_umodes |= UMODE_OPERWALL;
2842 >  ConfigGeneral.oper_only_umodes |= UMODE_EXTERNAL;
2843   } | T_SERVNOTICE
2844   {
2845 <  ConfigFileEntry.oper_only_umodes |= UMODE_SERVNOTICE;
2845 >  ConfigGeneral.oper_only_umodes |= UMODE_SERVNOTICE;
2846   } | T_INVISIBLE
2847   {
2848 <  ConfigFileEntry.oper_only_umodes |= UMODE_INVISIBLE;
2848 >  ConfigGeneral.oper_only_umodes |= UMODE_INVISIBLE;
2849   } | T_WALLOP
2850   {
2851 <  ConfigFileEntry.oper_only_umodes |= UMODE_WALLOP;
2851 >  ConfigGeneral.oper_only_umodes |= UMODE_WALLOP;
2852   } | T_SOFTCALLERID
2853   {
2854 <  ConfigFileEntry.oper_only_umodes |= UMODE_SOFTCALLERID;
2854 >  ConfigGeneral.oper_only_umodes |= UMODE_SOFTCALLERID;
2855   } | T_CALLERID
2856   {
2857 <  ConfigFileEntry.oper_only_umodes |= UMODE_CALLERID;
2857 >  ConfigGeneral.oper_only_umodes |= UMODE_CALLERID;
2858   } | T_LOCOPS
2859   {
2860 <  ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS;
2860 >  ConfigGeneral.oper_only_umodes |= UMODE_LOCOPS;
2861   } | T_NONONREG
2862   {
2863 <  ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
2863 >  ConfigGeneral.oper_only_umodes |= UMODE_REGONLY;
2864   } | T_FARCONNECT
2865   {
2866 <  ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT;
2866 >  ConfigGeneral.oper_only_umodes |= UMODE_FARCONNECT;
2867   };
2868  
2869   general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
2870   {
2871 <  ConfigFileEntry.min_nonwildcard = $3;
2871 >  ConfigGeneral.min_nonwildcard = $3;
2872   };
2873  
2874   general_min_nonwildcard_simple: MIN_NONWILDCARD_SIMPLE '=' NUMBER ';'
2875   {
2876 <  ConfigFileEntry.min_nonwildcard_simple = $3;
2876 >  ConfigGeneral.min_nonwildcard_simple = $3;
2877   };
2878  
2879   general_default_floodcount: DEFAULT_FLOODCOUNT '=' NUMBER ';'
2880   {
2881 <  ConfigFileEntry.default_floodcount = $3;
2881 >  ConfigGeneral.default_floodcount = $3;
2882   };
2883  
2884  
2885   /***************************************************************************
2886 < *  section channel
2886 > * channel {} section
2887   ***************************************************************************/
2888 < channel_entry: CHANNEL
2840 <  '{' channel_items '}' ';';
2888 > channel_entry: CHANNEL '{' channel_items '}' ';';
2889  
2890   channel_items:      channel_items channel_item | channel_item;
2891   channel_item:       channel_max_bans |
2892 <                    channel_knock_delay | channel_knock_delay_channel |
2893 <                    channel_max_chans_per_user | channel_max_chans_per_oper |
2894 <                    channel_default_split_user_count |
2895 <                    channel_default_split_server_count |
2896 <                    channel_no_create_on_split |
2897 <                    channel_no_join_on_split |
2898 <                    channel_jflood_count | channel_jflood_time |
2899 <                    channel_disable_fake_channels | error;
2892 >                    channel_invite_client_count |
2893 >                    channel_invite_client_time |
2894 >                    channel_invite_delay_channel |
2895 >                    channel_knock_client_count |
2896 >                    channel_knock_client_time |
2897 >                    channel_knock_delay_channel |
2898 >                    channel_max_channels |
2899 >                    channel_default_join_flood_count |
2900 >                    channel_default_join_flood_time |
2901 >                    channel_disable_fake_channels |
2902 >                    error;
2903  
2904   channel_disable_fake_channels: DISABLE_FAKE_CHANNELS '=' TBOOL ';'
2905   {
2906    ConfigChannel.disable_fake_channels = yylval.number;
2907   };
2908  
2909 < channel_knock_delay: KNOCK_DELAY '=' timespec ';'
2909 > channel_invite_client_count: INVITE_CLIENT_COUNT '=' NUMBER ';'
2910   {
2911 <  ConfigChannel.knock_delay = $3;
2911 >  ConfigChannel.invite_client_count = $3;
2912   };
2913  
2914 < channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2914 > channel_invite_client_time: INVITE_CLIENT_TIME '=' timespec ';'
2915   {
2916 <  ConfigChannel.knock_delay_channel = $3;
2916 >  ConfigChannel.invite_client_time = $3;
2917   };
2918  
2919 < channel_max_chans_per_user: MAX_CHANS_PER_USER '=' NUMBER ';'
2919 > channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';'
2920   {
2921 <  ConfigChannel.max_chans_per_user = $3;
2921 >  ConfigChannel.invite_delay_channel = $3;
2922   };
2923  
2924 < channel_max_chans_per_oper: MAX_CHANS_PER_OPER '=' NUMBER ';'
2924 > channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2925   {
2926 <  ConfigChannel.max_chans_per_oper = $3;
2926 >  ConfigChannel.knock_client_count = $3;
2927   };
2928  
2929 < channel_max_bans: MAX_BANS '=' NUMBER ';'
2929 > channel_knock_client_time: KNOCK_CLIENT_TIME '=' timespec ';'
2930   {
2931 <  ConfigChannel.max_bans = $3;
2931 >  ConfigChannel.knock_client_time = $3;
2932   };
2933  
2934 < channel_default_split_user_count: DEFAULT_SPLIT_USER_COUNT '=' NUMBER ';'
2934 > channel_knock_delay_channel: KNOCK_DELAY_CHANNEL '=' timespec ';'
2935   {
2936 <  ConfigChannel.default_split_user_count = $3;
2936 >  ConfigChannel.knock_delay_channel = $3;
2937   };
2938  
2939 < channel_default_split_server_count: DEFAULT_SPLIT_SERVER_COUNT '=' NUMBER ';'
2939 > channel_max_channels: MAX_CHANNELS '=' NUMBER ';'
2940   {
2941 <  ConfigChannel.default_split_server_count = $3;
2941 >  ConfigChannel.max_channels = $3;
2942   };
2943  
2944 < channel_no_create_on_split: NO_CREATE_ON_SPLIT '=' TBOOL ';'
2944 > channel_max_bans: MAX_BANS '=' NUMBER ';'
2945   {
2946 <  ConfigChannel.no_create_on_split = yylval.number;
2946 >  ConfigChannel.max_bans = $3;
2947   };
2948  
2949 < channel_no_join_on_split: NO_JOIN_ON_SPLIT '=' TBOOL ';'
2949 > channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';'
2950   {
2951 <  ConfigChannel.no_join_on_split = yylval.number;
2951 >  ConfigChannel.default_join_flood_count = yylval.number;
2952   };
2953  
2954 < channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';'
2954 > channel_default_join_flood_time: DEFAULT_JOIN_FLOOD_TIME '=' timespec ';'
2955   {
2956 <  GlobalSetOptions.joinfloodcount = yylval.number;
2956 >  ConfigChannel.default_join_flood_time = $3;
2957   };
2958  
2908 channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';'
2909 {
2910  GlobalSetOptions.joinfloodtime = yylval.number;
2911 };
2959  
2960   /***************************************************************************
2961 < *  section serverhide
2961 > * serverhide {} section
2962   ***************************************************************************/
2963 < serverhide_entry: SERVERHIDE
2917 <  '{' serverhide_items '}' ';';
2963 > serverhide_entry: SERVERHIDE '{' serverhide_items '}' ';';
2964  
2965   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
2966 < serverhide_item:    serverhide_flatten_links | serverhide_disable_remote_commands |
2966 > serverhide_item:    serverhide_flatten_links |
2967 >                    serverhide_flatten_links_delay |
2968 >                    serverhide_flatten_links_file |
2969 >                    serverhide_disable_remote_commands |
2970                      serverhide_hide_servers |
2971 <                    serverhide_hide_services |
2972 <                    serverhide_links_delay |
2973 <                    serverhide_hidden | serverhide_hidden_name |
2974 <                    serverhide_hide_server_ips |
2971 >                    serverhide_hide_services |
2972 >                    serverhide_hidden |
2973 >                    serverhide_hidden_name |
2974 >                    serverhide_hide_server_ips |
2975                      error;
2976  
2977   serverhide_flatten_links: FLATTEN_LINKS '=' TBOOL ';'
# Line 2931 | Line 2980 | serverhide_flatten_links: FLATTEN_LINKS
2980      ConfigServerHide.flatten_links = yylval.number;
2981   };
2982  
2983 + serverhide_flatten_links_delay: FLATTEN_LINKS_DELAY '=' timespec ';'
2984 + {
2985 +  if (conf_parser_ctx.pass == 2)
2986 +  {
2987 +    if ($3 > 0)
2988 +    {
2989 +      event_write_links_file.when = $3;
2990 +      event_add(&event_write_links_file, NULL);
2991 +    }
2992 +    else
2993 +     event_delete(&event_write_links_file);
2994 +
2995 +    ConfigServerHide.flatten_links_delay = $3;
2996 +  }
2997 + };
2998 +
2999 + serverhide_flatten_links_file: FLATTEN_LINKS_FILE '=' QSTRING ';'
3000 + {
3001 +  if (conf_parser_ctx.pass == 2)
3002 +  {
3003 +    xfree(ConfigServerHide.flatten_links_file);
3004 +    ConfigServerHide.flatten_links_file = xstrdup(yylval.string);
3005 +  }
3006 + };
3007 +
3008   serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';'
3009   {
3010    if (conf_parser_ctx.pass == 2)
# Line 2953 | Line 3027 | serverhide_hidden_name: HIDDEN_NAME '='
3027   {
3028    if (conf_parser_ctx.pass == 2)
3029    {
3030 <    MyFree(ConfigServerHide.hidden_name);
3030 >    xfree(ConfigServerHide.hidden_name);
3031      ConfigServerHide.hidden_name = xstrdup(yylval.string);
3032    }
3033   };
3034  
2961 serverhide_links_delay: LINKS_DELAY '=' timespec ';'
2962 {
2963  if (conf_parser_ctx.pass == 2)
2964  {
2965    if (($3 > 0) && ConfigServerHide.links_disabled == 1)
2966    {
2967      eventAddIsh("write_links_file", write_links_file, NULL, $3);
2968      ConfigServerHide.links_disabled = 0;
2969    }
2970
2971    ConfigServerHide.links_delay = $3;
2972  }
2973 };
2974
3035   serverhide_hidden: HIDDEN '=' TBOOL ';'
3036   {
3037    if (conf_parser_ctx.pass == 2)

Diff Legend

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