From a0fdf5fcd51c18e9fa3be245349582e70b69f74f Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 1 Oct 2012 00:52:01 +0200 Subject: BanCache: Remove BanCacheHit::IP field, and BanCacheManager::RemoveHit() The IP field was only used in RemoveHit(), RemoveHit() was only called from GetHit() --- include/bancache.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/bancache.h b/include/bancache.h index 9f7402336..e975bb68a 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -37,15 +37,12 @@ class CoreExport BanCacheHit /** Reason, shown as quit message */ std::string Reason; - /** IP to match against, no wildcards here (of course) - */ - std::string IP; /** Time that the ban expires at */ time_t Expiry; - BanCacheHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds) - : Type(type), Reason(reason), IP(ip), Expiry(ServerInstance->Time() + seconds) + BanCacheHit(const std::string &type, const std::string &reason, time_t seconds) + : Type(type), Reason(reason), Expiry(ServerInstance->Time() + seconds) { } }; @@ -71,7 +68,6 @@ class CoreExport BanCacheManager */ BanCacheHit *AddHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds = 0); BanCacheHit *GetHit(const std::string &ip); - bool RemoveHit(BanCacheHit *b); /** Removes all entries of a given type, either positive or negative. Returns the number of hits removed. * @param type The type of bancache entries to remove (e.g. 'G') -- cgit v1.3.1-10-gc9f91