diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 16:57:57 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 16:57:57 +0200 |
commit | 4e0b32e67e27235162f41b362ac62b86c9e0af18 (patch) | |
tree | c33178a78ce03308504b0f11caa08018c7f83f73 /src/modules/m_timedbans.cpp | |
parent | dfea56312886797f3e611cf3f1b72e43a8a365fa (diff) |
m_timedbans Remove TimedBan::channel
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r-- | src/modules/m_timedbans.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index f3fe38a3c..874e6440f 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -28,7 +28,6 @@ class TimedBan { public: - std::string channel; std::string mask; time_t expire; Channel* chan; @@ -83,7 +82,6 @@ class CommandTban : public Command } TimedBan T; - std::string channelname = parameters[0]; unsigned long duration = InspIRCd::Duration(parameters[1]); unsigned long expire = duration + ServerInstance->Time(); if (duration < 1) @@ -114,7 +112,6 @@ class CommandTban : public Command } CUList tmp; - T.channel = channelname; T.mask = mask; T.expire = expire + (IS_REMOTE(user) ? 5 : 0); T.chan = channel; @@ -206,13 +203,11 @@ class ModuleTimedBans : public Module for (timedbans::iterator i = expired.begin(); i != expired.end(); i++) { - std::string chan = i->channel; std::string mask = i->mask; - Channel* cr = ServerInstance->FindChan(chan); - if (cr) + Channel* cr = i->chan; { CUList empty; - std::string expiry = "*** Timed ban on " + chan + " expired."; + std::string expiry = "*** Timed ban on " + cr->name + " expired."; cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str()); ServerInstance->PI->SendChannelNotice(cr, '@', expiry); |