1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 12:53:11 +02:00

Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work

This commit is contained in:
Adam
2013-03-30 23:38:40 -05:00
parent 111d6a9178
commit 7e7556f064
14 changed files with 71 additions and 61 deletions
+4 -4
View File
@@ -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);
}
};