From c110833e6740c27c6f87489d5ce3b3f24c5d2a0b Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 6 Jan 2008 01:50:34 +0000 Subject: 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 --- include/bancache.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') 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. -- cgit v1.2.3