block: adminblock | generalblock | classblock | connectblock |
uworldblock | operblock | portblock | jupeblock | clientblock |
killblock | cruleblock | motdblock | featuresblock | quarantineblock |
- pseudoblock | iauthblock | error;
+ pseudoblock | iauthblock | error ';';
/* The timespec, sizespec and expr was ripped straight from
* ircd-hybrid-7. */
jupeblock: JUPE '{' jupeitems '}' ';' ;
jupeitems: jupeitem jupeitems | jupeitem;
-jupeitem: jupenick | error;
-jupenick: NICK '=' QSTRING
+jupeitem: jupenick;
+jupenick: NICK '=' QSTRING ';'
{
addNickJupes($3);
MyFree($3);
-} ';';
+};
-generalblock: GENERAL '{' generalitems '}'
+generalblock: GENERAL
{
+ /* Zero out the vhost addresses, in case they were removed. */
+ memset(&VirtualHost_v4.addr, 0, sizeof(VirtualHost_v4.addr));
+ memset(&VirtualHost_v6.addr, 0, sizeof(VirtualHost_v6.addr));
+} '{' generalitems '}' ';' {
if (localConf.name == NULL)
parse_error("Your General block must contain a name.");
if (localConf.numeric == 0)
parse_error("Your General block must contain a numeric (between 1 and 4095).");
-} ';' ;
+};
generalitems: generalitem generalitems | generalitem;
-generalitem: generalnumeric | generalname | generalvhost | generaldesc | error;
+generalitem: generalnumeric | generalname | generalvhost | generaldesc;
generalnumeric: NUMERIC '=' NUMBER ';'
{
if (localConf.numeric == 0)
generalvhost: VHOST '=' QSTRING ';'
{
struct irc_in_addr addr;
- if (!ircd_aton(&addr, $3))
- parse_error("Invalid virtual host '%s'.", $3);
+ if (!strcmp($3, "*")) {
+ /* This traditionally meant bind to all interfaces and connect
+ * from the default. */
+ } else if (!ircd_aton(&addr, $3))
+ parse_error("Invalid virtual host '%s'.", $3);
else if (irc_in_addr_is_ipv4(&addr))
memcpy(&VirtualHost_v4.addr, &addr, sizeof(addr));
else
MyFree($3);
};
-adminblock: ADMIN '{' adminitems '}'
+adminblock: ADMIN '{' adminitems '}' ';'
{
if (localConf.location1 == NULL)
DupString(localConf.location1, "");
DupString(localConf.location2, "");
if (localConf.contact == NULL)
DupString(localConf.contact, "");
-} ';';
+};
adminitems: adminitems adminitem | adminitem;
-adminitem: adminlocation | admincontact | error;
+adminitem: adminlocation | admincontact;
adminlocation: LOCATION '=' QSTRING ';'
{
if (localConf.location1 == NULL)
classblock: CLASS {
tping = 90;
-} '{' classitems '}'
+} '{' classitems '}' ';'
{
if (name != NULL)
{
sendq = 0;
memset(&privs, 0, sizeof(privs));
memset(&privs_dirty, 0, sizeof(privs_dirty));
-} ';';
+};
classitems: classitem classitems | classitem;
classitem: classname | classpingfreq | classconnfreq | classmaxlinks |
- classsendq | classusermode | priv | error;
+ classsendq | classusermode | priv;
classname: NAME '=' QSTRING ';'
{
MyFree(name);
{
maxlinks = 65535;
flags = CONF_AUTOCONNECT;
-} '{' connectitems '}'
+} '{' connectitems '}' ';'
{
struct ConfItem *aconf = NULL;
if (name == NULL)
name = pass = host = origin = hub_limit = NULL;
c_class = NULL;
port = flags = 0;
-}';';
+};
connectitems: connectitem connectitems | connectitem;
connectitem: connectname | connectpass | connectclass | connecthost
| connectport | connectvhost | connectleaf | connecthub
- | connecthublimit | connectmaxhops | connectauto | error;
+ | connecthublimit | connectmaxhops | connectauto;
connectname: NAME '=' QSTRING ';'
{
MyFree(name);
uworldblock: UWORLD '{' uworlditems '}' ';';
uworlditems: uworlditem uworlditems | uworlditem;
-uworlditem: uworldname | error;
+uworlditem: uworldname;
uworldname: NAME '=' QSTRING ';'
{
make_conf(CONF_UWORLD)->host = $3;
memset(&privs_dirty, 0, sizeof(privs_dirty));
};
operitems: operitem | operitems operitem;
-operitem: opername | operpass | operhost | operclass | priv | error;
+operitem: opername | operpass | operhost | operclass | priv;
opername: NAME '=' QSTRING ';'
{
MyFree(name);
port = tconn = tping = 0;
};
portitems: portitem portitems | portitem;
-portitem: portnumber | portvhost | portmask | portserver | porthidden | error;
+portitem: portnumber | portvhost | portmask | portserver | porthidden;
portnumber: PORT '=' NUMBER ';'
{
port = $3;
pass = NULL;
};
clientitems: clientitem clientitems | clientitem;
-clientitem: clienthost | clientip | clientusername | clientclass | clientpass | clientmaxlinks | error;
+clientitem: clienthost | clientip | clientusername | clientclass | clientpass | clientmaxlinks;
clienthost: HOST '=' QSTRING ';'
{
char *sep = strchr($3, '@');
killblock: KILL
{
dconf = (struct DenyConf*) MyCalloc(1, sizeof(*dconf));
-} '{' killitems '}'
+} '{' killitems '}' ';'
{
if (dconf->usermask || dconf->hostmask ||dconf->realmask) {
dconf->next = denyConfList;
parse_error("Kill block must match on at least one of username, host or realname");
}
dconf = NULL;
-} ';';
+};
killitems: killitem killitems | killitem;
-killitem: killuhost | killreal | killusername | killreasonfile | killreason | error;
+killitem: killuhost | killreal | killusername | killreasonfile | killreason;
killuhost: HOST '=' QSTRING ';'
{
char *h;
};
cruleitems: cruleitem cruleitems | cruleitem;
-cruleitem: cruleserver | crulerule | cruleall | error;
+cruleitem: cruleserver | crulerule | cruleall;
cruleserver: SERVER '=' QSTRING ';'
{
};
motditems: motditem motditems | motditem;
-motditem: motdhost | motdfile | error;
+motditem: motdhost | motdfile;
motdhost: HOST '=' QSTRING ';'
{
host = $3;
};
pseudoitems: pseudoitem pseudoitems | pseudoitem;
-pseudoitem: pseudoname | pseudoprepend | pseudonick | pseudoflags | error;
+pseudoitem: pseudoname | pseudoprepend | pseudonick | pseudoflags;
pseudoname: NAME '=' QSTRING ';'
{
MyFree(smap->name);
};
iauthitems: iauthitem iauthitems | iauthitem;
-iauthitem: iauthpass | iauthhost | iauthport | iauthconnfreq | iauthtimeout | error;
+iauthitem: iauthpass | iauthhost | iauthport | iauthconnfreq | iauthtimeout;
iauthpass: PASS '=' QSTRING ';'
{
MyFree(pass);