From: <ps...@us...> - 2009-07-15 18:28:14
|
Revision: 1564 http://znc.svn.sourceforge.net/znc/?rev=1564&view=rev Author: psychon Date: 2009-07-15 18:28:03 +0000 (Wed, 15 Jul 2009) Log Message: ----------- fail2ban: Clear all bans on rehash Modified Paths: -------------- trunk/Utils.h trunk/modules/fail2ban.cpp Modified: trunk/Utils.h =================================================================== --- trunk/Utils.h 2009-07-12 11:31:49 UTC (rev 1563) +++ trunk/Utils.h 2009-07-15 18:28:03 UTC (rev 1564) @@ -272,6 +272,13 @@ } } + /** + * @brief Clear all entries + */ + void Clear() { + m_mItems.clear(); + } + // Setters void SetTTL(unsigned int u) { m_uTTL = u; } // !Setters Modified: trunk/modules/fail2ban.cpp =================================================================== --- trunk/modules/fail2ban.cpp 2009-07-12 11:31:49 UTC (rev 1563) +++ trunk/modules/fail2ban.cpp 2009-07-15 18:28:03 UTC (rev 1564) @@ -38,6 +38,10 @@ return true; } + virtual void OnPostRehash() { + m_Cache.Clear(); + } + void Add(const CString& sHost, unsigned int count) { m_Cache.AddItem(sHost, count, m_Cache.GetTTL()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |