summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_timedbans.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 8a627b9a6..9a6824793 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -148,12 +148,13 @@ class BanWatcher : public ModeWatcher
return;
irc::string listitem = banmask.c_str();
- irc::string thischan = chan->name.c_str();
for (timedbans::iterator i = TimedBanList.begin(); i != TimedBanList.end(); ++i)
{
+ if (i->chan != chan)
+ continue;
+
irc::string target = i->mask.c_str();
- irc::string tchan = i->channel.c_str();
- if ((listitem == target) && (tchan == thischan))
+ if (listitem == target)
{
TimedBanList.erase(i);
break;