summaryrefslogtreecommitdiff
path: root/include/bancache.h
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-01 01:00:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-10 19:27:24 +0200
commit05ea9815235187a4821d0154ac8d7e1d982e3617 (patch)
treeb11451fd6f0f1bf027272804b53be253a54e1e6a /include/bancache.h
parenta0fdf5fcd51c18e9fa3be245349582e70b69f74f (diff)
BanCache: Simplify BanCacheManager::RemoveEntries()
Diffstat (limited to 'include/bancache.h')
-rw-r--r--include/bancache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bancache.h b/include/bancache.h
index e975bb68a..70ec09f02 100644
--- a/include/bancache.h
+++ b/include/bancache.h
@@ -45,6 +45,8 @@ class CoreExport BanCacheHit
: Type(type), Reason(reason), Expiry(ServerInstance->Time() + seconds)
{
}
+
+ bool IsPositive() const { return (!Reason.empty()); }
};
/* A container of ban cache items.
@@ -73,7 +75,7 @@ class CoreExport BanCacheManager
* @param type The type of bancache entries to remove (e.g. 'G')
* @param positive Remove either positive (true) or negative (false) hits.
*/
- unsigned int RemoveEntries(const std::string &type, bool positive);
+ void RemoveEntries(const std::string& type, bool positive);
BanCacheManager()
{