1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
19 class CoreExport BanCacheHit : public classbase
23 const std::string Type;
24 const std::string Reason;
26 const time_t Duration;
27 const time_t Creation;
30 // must be defined after class BanCacheHit.
31 typedef nspace::hash_map<std::string, BanCacheHit *, nspace::hash<std::string> > BanCacheHash;
33 class CoreExport BanCacheManager : public classbase
36 BanCacheHash *BanHash;
37 InspIRCd *ServerInstance;
39 BanCacheHit *AddHit(const std::string &ip, bool banned, const std::string &reason);
40 BanCacheHit *GetHit(const std::string &ip);
42 BanCacheManager(InspIRCd *Instance)
44 this->ServerInstance = Instance;
45 this->BanHash = new BanCacheHash();