summaryrefslogtreecommitdiff
path: root/src/bancache.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:31:43 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:31:43 +0000
commit64fec23cc76f86650860a24e5dae1d49e27f9111 (patch)
treeb66905137f76843dd18e279adf2dc8853725d4e8 /src/bancache.cpp
parent01d7b8e2463c3cb8e1f220e64abd5d560b886bc7 (diff)
Add removal of BanCache entries on XLINE add/del, so we avoid out of date responses.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8641 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/bancache.cpp')
-rw-r--r--src/bancache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bancache.cpp b/src/bancache.cpp
index 24578b379..e8accb404 100644
--- a/src/bancache.cpp
+++ b/src/bancache.cpp
@@ -87,9 +87,10 @@ unsigned int BanCacheManager::RemoveEntries(const std::string &type, bool positi
/* Safe to delete items here through iterator 'n' */
if (b->Type == type)
{
- if ((positive && !b->Reason.empty()) || b->Reason.empty())
+ if ((positive && !b->Reason.empty()) || !positive && b->Reason.empty())
{
/* we need to remove this one. */
+ ServerInstance->Log(DEBUG, "BanCacheManager::RemoveEntries(): Removing a hit on " + b->IP);
delete b;
b = NULL;
BanHash->erase(n); // WORD TO THE WISE: don't use RemoveHit here, because we MUST remove the iterator in a safe way.