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 ++++++++++++++++++++++++++++++++ src/bancache.cpp | 3 +++ 2 files changed, 35 insertions(+) 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 diff --git a/src/bancache.cpp b/src/bancache.cpp index d54b26caf..0c5f00502 100644 --- a/src/bancache.cpp +++ b/src/bancache.cpp @@ -13,4 +13,7 @@ /* $Core: libIRCDbancache */ +#include "inspircd.h" +#include "bancache.h" + -- cgit v1.2.3