diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-12 15:13:44 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-12 15:13:44 +0000 |
commit | caafe7737c057ec47825733734269dad49f65f68 (patch) | |
tree | 00dd494b9c482331b5b3eece2ccc4af21946292b | |
parent | c36ea00019075938b66aa6b5d9a9a5c49f6dbc15 (diff) |
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
-rw-r--r-- | src/modules/m_cgiirc.cpp | 26 |
1 files 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 |