From 94822c99c0bc84756ee0870b7d39c6410ed9184a Mon Sep 17 00:00:00 2001 From: Adam- Date: Wed, 31 Mar 2010 04:41:44 +0000 Subject: Added last used time to akick view git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2846 5417fbe8-f217-4b02-8779-1006273d7864 --- include/regchannel.h | 6 ++++-- include/services.h | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/regchannel.h b/include/regchannel.h index 6b0e9c264..18b2eead8 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -177,16 +177,18 @@ class CoreExport ChannelInfo : public Extensible, public Flags * @param akicknc The nickcore being akicked * @param reason The reason for the akick * @param t The time the akick was added, defaults to now + * @param lu The time the akick was last used, defaults to never */ - AutoKick *AddAkick(const std::string &user, NickCore *akicknc, const std::string &reason, time_t t = time(NULL)); + AutoKick *AddAkick(const std::string &user, NickCore *akicknc, const std::string &reason, time_t t = time(NULL), time_t lu = 0); /** Add an akick entry to the channel by reason * @param user The user who added the akick * @param mask The mask of the akick * @param reason The reason for the akick * @param t The time the akick was added, defaults to now + * @param lu The time the akick was last used, defaults to never */ - AutoKick *AddAkick(const std::string &user, const std::string &mask, const std::string &reason, time_t t = time(NULL)); + AutoKick *AddAkick(const std::string &user, const std::string &mask, const std::string &reason, time_t t = time(NULL), time_t lu = 0); /** Get an entry from the channel akick list * @param index The index in the akick vector diff --git a/include/services.h b/include/services.h index e13866e81..7e6783404 100644 --- a/include/services.h +++ b/include/services.h @@ -564,6 +564,7 @@ class AutoKick : public Flags std::string reason; std::string creator; time_t addtime; + time_t last_used; }; /** Flags for badwords @@ -1226,4 +1227,24 @@ class NickServRelease : public Timer static void ClearTimers(NickAlias *na, bool dorelease = false); }; +/** A timer used to keep the BotServ bot/ChanServ in the channel + * after kicking the last user in a channel + */ +class ChanServTimer : public Timer +{ + private: + Channel *c; + + public: + /** Default constructor + * @param chan The channel + */ + ChanServTimer(Channel *chan); + + /** Called when th edelay is up + * @param The current time + */ + void Tick(time_t); +}; + #endif /* SERVICES_H */ -- cgit