summaryrefslogtreecommitdiff
path: root/include/bancache.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-03 22:53:51 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-03 22:53:51 +0000
commitb104fdfe8a1625f5d2391108a0057b0831e07241 (patch)
tree80c7291730552dffaad6181db4aa8c20b640b574 /include/bancache.h
parent841dc636d191bafd714fc72e5e517bf4d64d64b6 (diff)
This won't work yet.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8484 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/bancache.h')
-rw-r--r--include/bancache.h32
1 files changed, 32 insertions, 0 deletions
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 <string>
+
+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<std::string, BanCacheHit *, nspace::hash<std::string> > 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