diff options
| author | Adam <Adam@anope.org> | 2013-03-30 23:38:40 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-03-30 23:39:43 -0500 |
| commit | 7e7556f06445d4d8e607ef514c9fb5009899db73 (patch) | |
| tree | fde8e4e7c59f40183e215cd69ce0d042670b24b9 /modules | |
| parent | 111d6a917806fd3ce2269436d08d68bd7eb1d5ea (diff) | |
Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/bs_kick.cpp | 4 | ||||
| -rw-r--r-- | modules/commands/bs_set.cpp | 8 | ||||
| -rw-r--r-- | modules/commands/cs_ban.cpp | 4 | ||||
| -rw-r--r-- | modules/commands/cs_seen.cpp | 4 | ||||
| -rw-r--r-- | modules/commands/os_defcon.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_httpd.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_proxyscan.cpp | 4 | ||||
| -rw-r--r-- | modules/pseudoclients/chanserv.cpp | 4 | ||||
| -rw-r--r-- | modules/pseudoclients/nickserv.cpp | 4 |
9 files changed, 20 insertions, 20 deletions
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 252220d09..3f7cc16c2 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -680,10 +680,10 @@ struct UserData : ExtensibleItem }; -class BanDataPurger : public CallBack +class BanDataPurger : public Timer { public: - BanDataPurger(Module *owner) : CallBack(owner, 300, Anope::CurTime, true) { } + BanDataPurger(Module *o) : Timer(o, 300, Anope::CurTime, true) { } void Tick(time_t) anope_override { diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index 41c84bf87..5aa8a77ec 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -57,15 +57,15 @@ class CommandBSSet : public Command class CommandBSSetBanExpire : public Command { public: - class Timer : public CallBack + class UnbanTimer : public Timer { Anope::string chname; Anope::string mask; public: - Timer(Module *creator, const Anope::string &ch, const Anope::string &bmask, time_t t) : CallBack(creator, t), chname(ch), mask(bmask) { } + UnbanTimer(Module *creator, const Anope::string &ch, const Anope::string &bmask, time_t t) : Timer(creator, t), chname(ch), mask(bmask) { } - void Tick(time_t) + void Tick(time_t) anope_override { Channel *c = Channel::Find(chname); if (c) @@ -504,7 +504,7 @@ class BSSet : public Module if (!ci->banexpire) return; - new CommandBSSetBanExpire::Timer(this, ci->name, mask, ci->banexpire); + new CommandBSSetBanExpire::UnbanTimer(this, ci->name, mask, ci->banexpire); } }; diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index c39f7f392..52c372fb4 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -15,14 +15,14 @@ static Module *me; -class TempBan : public CallBack +class TempBan : public Timer { private: Anope::string channel; Anope::string mask; public: - TempBan(time_t seconds, Channel *c, const Anope::string &banmask) : CallBack(me, seconds), channel(c->name), mask(banmask) { } + TempBan(time_t seconds, Channel *c, const Anope::string &banmask) : Timer(me, seconds), channel(c->name), mask(banmask) { } void Tick(time_t ctime) anope_override { diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index cd12695aa..10c23dd53 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -293,10 +293,10 @@ class CommandSeen : public Command } }; -class DataBasePurger : public CallBack +class DataBasePurger : public Timer { public: - DataBasePurger(Module *owner) : CallBack(owner, 300, Anope::CurTime, true) { } + DataBasePurger(Module *o) : Timer(o, 300, Anope::CurTime, true) { } void Tick(time_t) anope_override { diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index fe2ecc99f..214c14f2a 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -104,12 +104,12 @@ static ServiceReference<GlobalService> GlobalService("GlobalService", "Global"); static Timer *timeout; -class DefConTimeout : public CallBack +class DefConTimeout : public Timer { int level; public: - DefConTimeout(Module *mod, int newlevel) : CallBack(mod, DConfig.timeout), level(newlevel) + DefConTimeout(Module *mod, int newlevel) : Timer(mod, DConfig.timeout), level(newlevel) { timeout = this; } diff --git a/modules/extra/m_httpd.cpp b/modules/extra/m_httpd.cpp index d9855a226..f1e5392c5 100644 --- a/modules/extra/m_httpd.cpp +++ b/modules/extra/m_httpd.cpp @@ -279,14 +279,14 @@ class MyHTTPClient : public HTTPClient } }; -class MyHTTPProvider : public HTTPProvider, public CallBack +class MyHTTPProvider : public HTTPProvider, public Timer { int timeout; std::map<Anope::string, HTTPPage *> pages; std::list<Reference<MyHTTPClient> > clients; public: - MyHTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, const int t) : Socket(-1, i.find(':') != Anope::string::npos), HTTPProvider(c, n, i, p), CallBack(c, 10, Anope::CurTime, true), timeout(t) { } + MyHTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, const int t) : Socket(-1, i.find(':') != Anope::string::npos), HTTPProvider(c, n, i, p), Timer(c, 10, Anope::CurTime, true), timeout(t) { } void Tick(time_t) anope_override { diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp index feac20969..b77da2d3d 100644 --- a/modules/extra/m_proxyscan.cpp +++ b/modules/extra/m_proxyscan.cpp @@ -201,10 +201,10 @@ class ModuleProxyScan : public Module ProxyCallbackListener *listener; - class ConnectionTimeout : public CallBack + class ConnectionTimeout : public Timer { public: - ConnectionTimeout(Module *creator, long timeout) : CallBack(creator, timeout, Anope::CurTime, true) + ConnectionTimeout(Module *c, long timeout) : Timer(c, timeout, Anope::CurTime, true) { } diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 9832c622e..7b59c0597 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -13,10 +13,10 @@ #include "module.h" -class ExpireCallback : public CallBack +class ExpireCallback : public Timer { public: - ExpireCallback(Module *owner) : CallBack(owner, Config->ExpireTimeout, Anope::CurTime, true) { } + ExpireCallback(Module *o) : Timer(o, Config->ExpireTimeout, Anope::CurTime, true) { } void Tick(time_t) anope_override { diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 7b1ccd80c..e221c19c0 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -139,10 +139,10 @@ class MyNickServService : public NickServService } }; -class ExpireCallback : public CallBack +class ExpireCallback : public Timer { public: - ExpireCallback(Module *owner) : CallBack(owner, Config->ExpireTimeout, Anope::CurTime, true) { } + ExpireCallback(Module *o) : Timer(o, Config->ExpireTimeout, Anope::CurTime, true) { } void Tick(time_t) anope_override { |
