diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-31 04:41:44 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-31 04:41:44 +0000 |
| commit | 94822c99c0bc84756ee0870b7d39c6410ed9184a (patch) | |
| tree | ceef914590a40c3d03973f938b791b01d7dd8fed /include | |
| parent | a3347b59a1f103d265c68c5880f9dabee1bbfd6a (diff) | |
Added last used time to akick view
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2846 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
| -rw-r--r-- | include/regchannel.h | 6 | ||||
| -rw-r--r-- | include/services.h | 21 |
2 files changed, 25 insertions, 2 deletions
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<ChannelInfoFlag> * @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<AutoKickFlag> 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 */ |
