- for(CGIHostlist::iterator iter = cmd.Hosts.begin(); iter != cmd.Hosts.end(); iter++)
- {
- if(InspIRCd::Match(user->host, iter->hostmask, ascii_case_insensitive_map) || InspIRCd::MatchCIDR(user->GetIPString(), iter->hostmask, ascii_case_insensitive_map))
- {
- // Deal with it...
- if(iter->type == PASS)
- {
- CheckPass(user); // We do nothing if it fails so...
- user->CheckLines(true);
- }
- else if(iter->type == PASSFIRST && !CheckPass(user))
- {
- // If the password lookup failed, try the ident
- CheckIdent(user); // If this fails too, do nothing
- user->CheckLines(true);
- }
- else if(iter->type == IDENT)
- {
- CheckIdent(user); // Nothing on failure.
- user->CheckLines(true);
- }
- else if(iter->type == IDENTFIRST && !CheckIdent(user))
- {
- // If the ident lookup fails, try the password.
- CheckPass(user);
- user->CheckLines(true);
- }
- else if(iter->type == WEBIRC)
- {
- // We don't need to do anything here
- }
- return MOD_RES_PASSTHRU;
- }
- }
- return MOD_RES_PASSTHRU;