From 76710ee4c6193c2c0f702c67ccb6ec68f0a1f315 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 16:39:08 +0200 Subject: m_timedbans Remove one irc::string usage --- src/modules/m_timedbans.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3