+ /** Type of cached ban
+ */
+ std::string Type;
+ /** Reason, shown as quit message
+ */
+ std::string Reason;
+ /** IP to match against, no wildcards here (of course)
+ */
+ std::string IP;
+ /** Time that the ban expires at
+ */
+ time_t Expiry;
+
+ BanCacheHit(const std::string &ip, const std::string &type, const std::string &reason)
+ {
+ this->Type = type;
+ this->Reason = reason;
+ this->IP = ip;
+ this->Expiry = ServerInstance->Time() + 86400; // a day. this might seem long, but entries will be removed as glines/etc expire.
+ }
+
+ // overridden to allow custom time
+ BanCacheHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds)
+ {
+ this->Type = type;
+ this->Reason = reason;
+ this->IP = ip;
+ this->Expiry = ServerInstance->Time() + seconds;
+ }
+};