summaryrefslogtreecommitdiff
path: root/src/bancache.cpp
diff options
context:
space:
mode:
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.