diff options
Diffstat (limited to 'src/modules/m_banexception.cpp')
-rw-r--r-- | src/modules/m_banexception.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 609e5c221..c39a74164 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -69,19 +69,21 @@ public: if (list) { - char mask[MAXBUF]; - snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString()); - for (modelist::iterator it = list->begin(); it != list->end(); it++) + // No list, so let them in anyway. + return 0; + } + + char mask[MAXBUF]; + snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString()); + + for (modelist::iterator it = list->begin(); it != list->end(); it++) + { + if (match(user->GetFullRealHost(), it->mask.c_str()) || match(user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask.c_str(), true))) { - if (match(user->GetFullRealHost(), it->mask.c_str()) || match(user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask.c_str(), true))) - { - // They match an entry on the list, so let them in. - return 1; - } + // They match an entry on the list, so let them in. + return 1; } - return 0; } - // or if there wasn't a list, there can't be anyone on it, so we don't need to do anything. } return 0; } |