From b104fdfe8a1625f5d2391108a0057b0831e07241 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 3 Nov 2007 22:53:51 +0000 Subject: This won't work yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8484 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/bancache.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include/bancache.h') diff --git a/include/bancache.h b/include/bancache.h index 6679a2c55..1edbbe5a1 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -14,4 +14,36 @@ #ifndef __BANCACHE_H #define __BANCACHE_H +#include + +class CoreExport BanCacheHit : public classbase +{ + private: + public: + const std::string Type; + const std::string Reason; + const bool Banned; + const time_t Duration; + const time_t Creation; +} + +// must be defined after class BanCacheHit. +typedef nspace::hash_map > BanCacheHash; + +class CoreExport BanCacheManager : public classbase +{ + private: + BanCacheHash *BanHash; + InspIRCd *ServerInstance; + public: + BanCacheHit *AddHit(const std::string &ip, bool banned, const std::string &reason); + BanCacheHit *GetHit(const std::string &ip); + + BanCacheManager(InspIRCd *Instance) + { + this->ServerInstance = Instance; + this->BanHash = new BanCacheHash(); + } +} + #endif -- cgit v1.2.3