diff options
-rw-r--r-- | include/bancache.h | 6 | ||||
-rw-r--r-- | src/bancache.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/bancache.h b/include/bancache.h index 2ae740ece..cabd85365 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -57,6 +57,12 @@ class CoreExport BanCacheManager : public classbase 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') + * @param positive Remove either positive (true) or negative (false) hits. + */ + int RemoveEntries(const std::string &type, bool positive); + BanCacheManager(InspIRCd *Instance) { this->ServerInstance = Instance; diff --git a/src/bancache.cpp b/src/bancache.cpp index bfa1bde11..b4fccbbf8 100644 --- a/src/bancache.cpp +++ b/src/bancache.cpp @@ -63,6 +63,11 @@ bool BanCacheManager::RemoveHit(BanCacheHit *b) return true; } +int BanCacheManager::RemoveEntries(const std::string &type, bool positive) +{ + return 0; +} + void BanCacheManager::RehashCache() { BanCacheHash* NewHash = new BanCacheHash(); |