diff options
| author | Adam <Adam@anope.org> | 2010-09-16 18:12:12 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-09-16 18:12:12 -0400 |
| commit | cd1e9f3181234521a2858f73b47f57a22c0dad40 (patch) | |
| tree | 2d2613af40ce3196d2149f9b614f363db088b802 /include | |
| parent | ccc6109879617f4fc910bd78d395b9eee4300a2e (diff) | |
Fixed Anope::CurTime to really work, and made ChanServ timers allow using the channels botserv bot instead of only ChanServ
Diffstat (limited to 'include')
| -rw-r--r-- | include/anope.h | 7 | ||||
| -rw-r--r-- | include/regchannel.h | 21 | ||||
| -rw-r--r-- | include/services.h | 20 |
3 files changed, 27 insertions, 21 deletions
diff --git a/include/anope.h b/include/anope.h index 51a80a598..a63abb9d1 100644 --- a/include/anope.h +++ b/include/anope.h @@ -291,7 +291,7 @@ namespace Anope /** The current system time, which is pretty close to being accurate. * Use this unless you need very specific time checks */ - static time_t CurTime = time(NULL); + extern time_t CurTime; extern CoreExport string Version(); @@ -477,6 +477,11 @@ class dynamic_reference : public dynamic_reference_base { return this->ref; } + + virtual inline T *operator*() + { + return this->ref; + } }; #endif // ANOPE_H diff --git a/include/regchannel.h b/include/regchannel.h index 2b7ea67f4..689857c2d 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -300,4 +300,25 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, void RestoreTopic(); }; +/** 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: + dynamic_reference<Channel> c; + + public: + /** Default constructor + * @param chan The channel + */ + ChanServTimer(Channel *chan); + + /** Called when the delay is up + * @param The current time + */ + void Tick(time_t); +}; + + #endif // REGCHANNEL_H diff --git a/include/services.h b/include/services.h index 3034613b4..5575dc0bc 100644 --- a/include/services.h +++ b/include/services.h @@ -1030,26 +1030,6 @@ struct Uplink Uplink(const Anope::string &_host, int _port, const Anope::string &_password, bool _ipv6) : host(_host), port(_port), password(_password), ipv6(_ipv6) { } }; -/** 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); -}; - /** A class to process numbered lists (passed to most DEL/LIST/VIEW commands). * The function HandleNumber is called for every number in the list. Note that * if descending is true it gets called in descending order. This is so deleting |
