diff options
Diffstat (limited to 'modules/commands/os_forbid.cpp')
-rw-r--r-- | modules/commands/os_forbid.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index 0d4426839..46d9aafb7 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -105,6 +105,18 @@ class MyForbidService : public ForbidService return NULL; } + ForbidData *FindForbidExact(const Anope::string &mask, ForbidType ftype) anope_override + { + for (unsigned i = this->forbids(ftype).size(); i > 0; --i) + { + ForbidData *d = this->forbids(ftype)[i - 1]; + + if (d->mask.equals_ci(mask)) + return d; + } + return NULL; + } + std::vector<ForbidData *> GetForbids() anope_override { std::vector<ForbidData *> f; @@ -203,7 +215,7 @@ class CommandOSForbid : public Command return; } - ForbidData *d = this->fs->FindForbid(entry, ftype); + ForbidData *d = this->fs->FindForbidExact(entry, ftype); bool created = false; if (d == NULL) { @@ -322,7 +334,7 @@ class CommandOSForbid : public Command { const Anope::string &entry = params[2]; - ForbidData *d = this->fs->FindForbid(entry, ftype); + ForbidData *d = this->fs->FindForbidExact(entry, ftype); if (d != NULL) { if (Anope::ReadOnly) |