From caafe7737c057ec47825733734269dad49f65f68 Mon Sep 17 00:00:00 2001 From: peavey Date: Thu, 12 Jul 2007 15:13:44 +0000 Subject: Apply patch from lain to fix multiple cgihosts not being read correctly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7436 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cgiirc.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 3a80bba0d..ec6d5d398 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -162,20 +162,20 @@ public: if(hostmask.length()) { - Hosts.push_back(CGIhost(hostmask)); - - if(type == "pass") - Hosts.back().type = PASS; - else if(type == "ident") - Hosts.back().type = IDENT; - else if(type == "passfirst") - Hosts.back().type = PASSFIRST; - else if(type == "webirc") { - Hosts.back().type = WEBIRC; - if(password.length()) - Hosts.back().password=password; - else + if(type == "webirc" && !password.length()) { ServerInstance->Log(DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str()); + } else { + CGItype cgitype; + if(type == "pass") + cgitype = PASS; + else if(type == "ident") + cgitype = IDENT; + else if(type == "passfirst") + cgitype = PASSFIRST; + else if(type == "webirc") { + cgitype = WEBIRC; + } + Hosts.push_back(CGIhost(hostmask,cgitype, password.length() ? password : "" )); } } else -- cgit v1.2.3