summaryrefslogtreecommitdiff
path: root/src/modules/cs_tban.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-02-25 06:20:00 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-02-25 06:20:00 +0000
commit235c4ae95c1cf467ec47514c2226df675494c12c (patch)
tree68fac6b16edd8e0024a7edb9ca1294d59bd62bd3 /src/modules/cs_tban.c
parent54a60add71fc584765b8e575fdc699e93ec2ba84 (diff)
Rewrote part of the Timer and CallBack code for modules to be sane
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2795 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/cs_tban.c')
-rw-r--r--src/modules/cs_tban.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c
index 07f7f6c0f..46c678522 100644
--- a/src/modules/cs_tban.c
+++ b/src/modules/cs_tban.c
@@ -168,14 +168,14 @@ void mySendResponse(User *u, const char *channel, char *mask, const char *time)
me->NoticeLang(Config.s_ChanServ, u, TBAN_RESPONSE, mask, channel, time);
}
-class TempBan : public Timer
+class TempBan : public CallBack
{
private:
std::string chan;
std::string mask;
public:
- TempBan(time_t seconds, const std::string &channel, const std::string &banmask) : Timer(seconds), chan(channel), mask(banmask) { }
+ TempBan(time_t seconds, const std::string &channel, const std::string &banmask) : CallBack(me, seconds), chan(channel), mask(banmask) { }
void Tick(time_t ctime)
{
@@ -192,7 +192,7 @@ void addBan(Channel *c, time_t timeout, char *banmask)
{
c->SetMode(NULL, CMODE_BAN, banmask);
- me->AddCallBack(new TempBan(timeout, c->name, banmask));
+ new TempBan(timeout, c->name, banmask);
}
int canBanUser(Channel * c, User * u, User * u2)