]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Remove negative BanCache entries only when the AddLine is successful instead of remov...
authorattilamolnar <attilamolnar@hush.com>
Sun, 8 Jul 2012 13:03:35 +0000 (15:03 +0200)
committerattilamolnar <attilamolnar@hush.com>
Sun, 22 Jul 2012 20:22:11 +0000 (22:22 +0200)
src/xline.cpp

index ed3ed6364b1ef01714867cf57e0f64026211c48c..397b937ec8057aa06fd8d1f8ec04f21eeefd2e66 100644 (file)
@@ -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);