From 15d925ac4dd5f1dec3acc42da20245a18de387df Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Sat, 23 Apr 2005 13:49:41 +0000 Subject: [PATCH] Allow more than one _functioning_ name= in a UWorld block. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1378 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 7 +++++++ doc/example.conf | 18 ++---------------- ircd/ircd_parser.y | 20 ++++---------------- 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fcb69a..0d7457b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-23 Michael Poole + + * doc/example.conf (UWorld): Illustrate new config extension. + + * ircd/ircd_parser.y (uworldblock): Do the expected thing when + multiple name= entries are present. + 2005-04-22 Michael Poole * RELEASE.NOTES: Silence exceptions use ~, not -. Oops! diff --git a/doc/example.conf b/doc/example.conf index 2cda2e0..930fe43 100644 --- a/doc/example.conf +++ b/doc/example.conf @@ -396,6 +396,8 @@ motd { # name = "relservername"; # }; # +# You may have have more than one name listed in each block. +# # Note: (1) These lines are agreed on by every server admin on Undernet; # (2) These lines must be the same on every single server, or results # will be disasterous; (3) This is a useful feature, not something that @@ -413,29 +415,13 @@ motd { UWorld { name = "uworld.eu.undernet.org"; -}; -UWorld { name = "uworld2.undernet.org"; -}; -UWorld { name = "uworld.undernet.org"; -}; -UWorld { name = "channels.undernet.org"; -}; -UWorld { name = "channels2.undernet.org"; -}; -UWorld { name = "channels3.undernet.org"; -}; -UWorld { name = "channels4.undernet.org"; -}; -UWorld { name = "channels5.undernet.org"; -}; -UWorld { name = "channels6.undernet.org"; }; diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index 1c65d65..d2f3763 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -471,26 +471,14 @@ connectmaxhops: MAXHOPS '=' expr ';' maxlinks = $3; }; -uworldblock: UWORLD '{' uworlditems '}' ';' -{ - if (name) - { - struct ConfItem *aconf = make_conf(CONF_UWORLD); - aconf->host = name; - } - else - { - MyFree(name); - parse_error("Bad UWorld block"); - } - name = NULL; -}; +uworldblock: UWORLD '{' uworlditems '}' ';'; uworlditems: uworlditem uworlditems | uworlditem; uworlditem: uworldname | error; uworldname: NAME '=' QSTRING ';' { - MyFree(name); - DupString(name, $3); + struct ConfItem *aconf; + aconf = make_conf(CONF_UWORLD); + DupString(aconf->host, $3); }; operblock: OPER '{' operitems '}' ';' -- 2.20.1