diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_cgiirc.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 290f55d22..d82705d81 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -23,7 +23,7 @@ /* $ModDesc: Change user's hosts connecting from known CGI:IRC hosts */ -enum CGItype { PASS, IDENT, PASSFIRST, IDENTFIRST, WEBIRC }; +enum CGItype { INVALID, PASS, IDENT, PASSFIRST, IDENTFIRST, WEBIRC }; /** Holds a CGI site's details @@ -162,19 +162,26 @@ public: if(hostmask.length()) { - if(type == "webirc" && !password.length()) { + if (type == "webirc" && !password.length()) { ServerInstance->Log(DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str()); - } else { - CGItype cgitype; - if(type == "pass") + } + else + { + CGItype cgitype = INVALID; + if (type == "pass") cgitype = PASS; - else if(type == "ident") + else if (type == "ident") cgitype = IDENT; - else if(type == "passfirst") + else if (type == "passfirst") cgitype = PASSFIRST; - else if(type == "webirc") { + else if (type == "webirc") + { cgitype = WEBIRC; } + + if (cgitype == INVALID) + cgitype = PASS; + Hosts.push_back(CGIhost(hostmask,cgitype, password.length() ? password : "" )); } } |