fail2ban: Clear all bans on rehash

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1564 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-07-15 18:28:03 +00:00
parent 165070019d
commit 1d03b50d73
2 changed files with 11 additions and 0 deletions

View File

@@ -272,6 +272,13 @@ public:
}
}
/**
* @brief Clear all entries
*/
void Clear() {
m_mItems.clear();
}
// Setters
void SetTTL(unsigned int u) { m_uTTL = u; }
// !Setters

View File

@@ -38,6 +38,10 @@ public:
return true;
}
virtual void OnPostRehash() {
m_Cache.Clear();
}
void Add(const CString& sHost, unsigned int count) {
m_Cache.AddItem(sHost, count, m_Cache.GetTTL());
}