X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fbancache.h;h=c9c469e4f8fa4a81bdac25dea41679b5ef7e210a;hb=d1ddbd62f91d4b9453447b5d25f5e41e807b0010;hp=5bfa2fa3f10b63eafafe3891668f3d5485897b67;hpb=01ce98f2746be837a64f5f9ed2c36eeaabae7462;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/bancache.h b/include/bancache.h index 5bfa2fa3f..c9c469e4f 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -23,8 +23,6 @@ */ class CoreExport BanCacheHit : public classbase { - private: - InspIRCd *ServerInstance; public: /** Type of cached ban */ @@ -39,9 +37,8 @@ class CoreExport BanCacheHit : public classbase */ time_t Expiry; - BanCacheHit(InspIRCd *Instance, const std::string &ip, const std::string &type, const std::string &reason) + BanCacheHit(const std::string &ip, const std::string &type, const std::string &reason) { - ServerInstance = Instance; this->Type = type; this->Reason = reason; this->IP = ip; @@ -49,9 +46,8 @@ class CoreExport BanCacheHit : public classbase } // overridden to allow custom time - BanCacheHit(InspIRCd *Instance, const std::string &ip, const std::string &type, const std::string &reason, time_t seconds) + BanCacheHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds) { - ServerInstance = Instance; this->Type = type; this->Reason = reason; this->IP = ip; @@ -74,7 +70,6 @@ class CoreExport BanCacheManager : public classbase { private: BanCacheHash* BanHash; - InspIRCd* ServerInstance; public: /** Creates and adds a Ban Cache item. @@ -95,11 +90,14 @@ class CoreExport BanCacheManager : public classbase */ unsigned int RemoveEntries(const std::string &type, bool positive); - BanCacheManager(InspIRCd *Instance) + BanCacheManager() { - this->ServerInstance = Instance; this->BanHash = new BanCacheHash(); } + ~BanCacheManager() + { + delete BanHash; + } void RehashCache(); };