mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
7
Utils.h
7
Utils.h
@@ -272,6 +272,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Clear all entries
|
||||
*/
|
||||
void Clear() {
|
||||
m_mItems.clear();
|
||||
}
|
||||
|
||||
// Setters
|
||||
void SetTTL(unsigned int u) { m_uTTL = u; }
|
||||
// !Setters
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user