diff options
author | Peter Powell <petpow@saberuk.com> | 2017-08-31 22:51:58 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-09-01 16:20:10 +0100 |
commit | 1bdf114d37a2932138196d3438eddd30bf9d73a2 (patch) | |
tree | 1a3da76ec8b92f2f5869ae7ecb3029950aea4ed0 /src/commands.cpp | |
parent | 45fc75457b56bb14ad0f7b99909b96404df69c8c (diff) |
Fix {Host,IP}MatchesEveryone using Match instead of MatchCIDR.
MatchCIDR is what [GKZ]Line::Matches uses it so we should also use
it here to prevent insane bans that should not pass from passing.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index d805a1f65..5bf2aeb03 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -42,8 +42,8 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user) for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) { - if ((InspIRCd::Match(u->second->MakeHost(), mask, ascii_case_insensitive_map)) || - (InspIRCd::Match(u->second->MakeHostIP(), mask, ascii_case_insensitive_map))) + if ((InspIRCd::MatchCIDR(u->second->MakeHost(), mask, ascii_case_insensitive_map)) || + (InspIRCd::MatchCIDR(u->second->MakeHostIP(), mask, ascii_case_insensitive_map))) { matches++; } @@ -74,7 +74,7 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user) for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) { - if (InspIRCd::Match(u->second->GetIPString(), ip, ascii_case_insensitive_map)) + if (InspIRCd::MatchCIDR(u->second->GetIPString(), ip, ascii_case_insensitive_map)) matches++; } |