diff options
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 */ |
