aboutsummaryrefslogtreecommitdiffstats
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2012-07-08 15:03:35 +0200
committerGravatar attilamolnar2012-07-22 22:22:11 +0200
commitdd7aff3701037b060ee5a582ffec0fe4e18e6437 (patch)
tree3d7bf3469e799568b405219515a6d23b2b1ccfd6 /src/xline.cpp
parentDon't hardcode conf/inspircd.conf as the config file, allow the configure scr... (diff)
downloadinspircd++-dd7aff3701037b060ee5a582ffec0fe4e18e6437.tar.gz
inspircd++-dd7aff3701037b060ee5a582ffec0fe4e18e6437.tar.bz2
inspircd++-dd7aff3701037b060ee5a582ffec0fe4e18e6437.zip
Remove negative BanCache entries only when the AddLine is successful instead of removing them before checking anything
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp4
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);