From c1f4db3fb7928423ecc2606a1575c2a317535167 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Sat, 2 Apr 2016 19:45:09 -0500 Subject: [PATCH] Tweak some configuration semantics of opm --- ircd/newconf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ircd/newconf.c b/ircd/newconf.c index 0fd55094d..3e3644e39 100644 --- a/ircd/newconf.c +++ b/ircd/newconf.c @@ -2054,7 +2054,7 @@ conf_end_opm(struct TopConf *tc) if(!rb_dlink_list_length(&yy_opm_scanner_list)) { - conf_report_error("No opm scanners configured, disabling opm."); + conf_report_error("No opm scanners configured -- disabling opm."); fail = true; goto end; } @@ -2089,10 +2089,13 @@ conf_end_opm(struct TopConf *tc) /* If there's no listeners... */ fail = (yy_opm_port_ipv4 == 0 || yy_opm_port_ipv6 == 0); - - if(!fail && yy_opm_timeout > 0) + if(!fail && yy_opm_timeout > 0 && yy_opm_timeout < 60) /* Send timeout */ set_authd_timeout("opm_timeout", yy_opm_timeout); + else if(fail) + conf_report_error("No opm listeners -- disabling"); + else if(yy_opm_timeout <= 0 || yy_opm_timeout >= 60) + conf_report_error("opm::timeout value is invalid -- ignoring"); end: RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_opm_scanner_list.head)