diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-08 15:03:35 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-07-22 22:22:11 +0200 |
commit | dd7aff3701037b060ee5a582ffec0fe4e18e6437 (patch) | |
tree | 3d7bf3469e799568b405219515a6d23b2b1ccfd6 | |
parent | 9b66dd6c292347acf313c1ee9506231749f3d270 (diff) |
Remove negative BanCache entries only when the AddLine is successful instead of removing them before checking anything
-rw-r--r-- | src/xline.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index ed3ed6364..397b937ec 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -252,8 +252,6 @@ IdentHostPair XLineManager::IdentSplit(const std::string &ident_and_host) bool XLineManager::AddLine(XLine* line, User* user) { - ServerInstance->BanCache->RemoveEntries(line->type, false); // XXX perhaps remove ELines here? - if (line->duration && ServerInstance->Time() > line->expiry) return false; // Don't apply expired XLines. @@ -273,6 +271,8 @@ bool XLineManager::AddLine(XLine* line, User* user) if (!xlf) return false; + ServerInstance->BanCache->RemoveEntries(line->type, false); // XXX perhaps remove ELines here? + if (xlf->AutoApplyToUserList(line)) pending_lines.push_back(line); |