From: attilamolnar Date: Sun, 8 Jul 2012 13:03:35 +0000 (+0200) Subject: Remove negative BanCache entries only when the AddLine is successful instead of remov... X-Git-Tag: v2.0.23~604 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=dd7aff3701037b060ee5a582ffec0fe4e18e6437;p=user%2Fhenk%2Fcode%2Finspircd.git Remove negative BanCache entries only when the AddLine is successful instead of removing them before checking anything --- 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);