summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:15:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:15:58 +0000
commit01d7b8e2463c3cb8e1f220e64abd5d560b886bc7 (patch)
treed2cac8f5b6632680cea7a6cdb3a9de17d4031893 /include
parentef8c1e5e6542a4cb9f24ab0a3a480ca1c0230e86 (diff)
Add bancache expiry stuff, currently records expire 60 seconds after creation. Live, we will want perhaps an hour before expiry.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8640 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/bancache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bancache.h b/include/bancache.h
index cabd85365..75d1a67b5 100644
--- a/include/bancache.h
+++ b/include/bancache.h
@@ -24,6 +24,7 @@ class CoreExport BanCacheHit : public classbase
std::string Type;
std::string Reason;
std::string IP;
+ time_t Expiry;
BanCacheHit(InspIRCd *Instance, const std::string &ip, const std::string &type, const std::string &reason)
{
@@ -31,6 +32,7 @@ class CoreExport BanCacheHit : public classbase
this->Type = type;
this->Reason = reason;
this->IP = ip;
+ this->Expiry = time(NULL) + 60; // XXX changeme
}
};
@@ -61,7 +63,7 @@ class CoreExport BanCacheManager : public classbase
* @param type The type of bancache entries to remove (e.g. 'G')
* @param positive Remove either positive (true) or negative (false) hits.
*/
- int RemoveEntries(const std::string &type, bool positive);
+ unsigned int RemoveEntries(const std::string &type, bool positive);
BanCacheManager(InspIRCd *Instance)
{