From 05ea9815235187a4821d0154ac8d7e1d982e3617 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 1 Oct 2012 01:00:10 +0200 Subject: BanCache: Simplify BanCacheManager::RemoveEntries() --- include/bancache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/bancache.h') 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() { -- cgit v1.2.3