summaryrefslogtreecommitdiff
path: root/include/bancache.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:50:34 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-06 01:50:34 +0000
commitc110833e6740c27c6f87489d5ce3b3f24c5d2a0b (patch)
tree6163fc732d2df3df9b2e7d70f045dc91024bdc96 /include/bancache.h
parent66d15c4a15d2bfbb2ef6fe22e5ae29f436fcb9ec (diff)
Add overridden constructor with specified time in seconds for bancache entry to last (we'll probably want to use this for xlines etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8644 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/bancache.h')
-rw-r--r--include/bancache.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/bancache.h b/include/bancache.h
index 75d1a67b5..b9eca943c 100644
--- a/include/bancache.h
+++ b/include/bancache.h
@@ -34,6 +34,16 @@ class CoreExport BanCacheHit : public classbase
this->IP = ip;
this->Expiry = time(NULL) + 60; // XXX changeme
}
+
+ // overridden to allow custom time
+ BanCacheHit(InspIRCd *Instance, const std::string &ip, const std::string &type, const std::string &reason, time_t seconds)
+ {
+ ServerInstance = Instance;
+ this->Type = type;
+ this->Reason = reason;
+ this->IP = ip;
+ this->Expiry = time(NULL) + seconds;
+ }
};
// must be defined after class BanCacheHit.