diff options
Diffstat (limited to 'src')
-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 |