From dd7aff3701037b060ee5a582ffec0fe4e18e6437 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 8 Jul 2012 15:03:35 +0200 Subject: Remove negative BanCache entries only when the AddLine is successful instead of removing them before checking anything --- src/xline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3