From b1bf1ad0d9395083af8dc597d254d432a816bc4f Mon Sep 17 00:00:00 2001 From: Perry Lorier Date: Sat, 19 Feb 2005 22:11:39 +0000 Subject: [PATCH] Author: Perry Lorier Log message: Moved the config to use parse_error() instead of log_write() so that ircd -k shows the error. Also clarified the error message for missing classes in oper blocks. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1320 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 6 ++++++ ircd/ircd_parser.y | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 574c131..4520829 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-20 Perry Lorier + + * ircd/ircd_parser.y: Moved some parse errors from log_write()'s to + parse_error()'s so that ./ircd -k will display them. Also clarified + the warning about oper blocks. + 2005-02-20 Perry Lorier * tools/convert-conf.py: A multitude of changes to deal with parsing diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index cf27247..c220597 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -510,7 +510,7 @@ operblock: OPER '{' operitems '}' ';' } else { - log_write(LS_CONFIG, L_ERROR, 0, "operator blocks need a name, password, and host."); + parse_error("operator blocks need a name, password, class and host."); MyFree(name); MyFree(pass); MyFree(host); @@ -890,8 +890,7 @@ quarantineblock: QUARANTINE '{' { if (qconf->chname == NULL || qconf->reason == NULL) { - log_write(LS_CONFIG, L_ERROR, 0, "quarantine blocks need a channel name " - "and a reason."); + parse_error("quarantine blocks need a channel name and a reason."); return 0; } qconf->next = GlobalQuarantineList; @@ -916,7 +915,7 @@ pseudoitems '}' ';' { if (!smap->name || !smap->services) { - log_write(LS_CONFIG, L_ERROR, 0, "pseudo commands need a service name and list of target nicks."); + parse_error("pseudo commands need a service name and list of target nicks."); return 0; } if (register_mapping(smap)) @@ -971,7 +970,7 @@ iauthblock: IAUTH '{' } iauthitems '}' ';' { if (!host || !port) { - log_write(LS_CONFIG, L_ERROR, 0, "IAuth block needs a server name and port."); + parse_error("IAuth block needs a server name and port."); return 0; } iauth_connect(host, port, pass, tconn, tping); -- 2.20.1