From ca8a7481bdf37a08f8d406121def4173c7d4e377 Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Sun, 30 Jan 2011 11:37:56 -0500 Subject: Fix bug #83 --- src/modules/m_channelban.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index cf86a8e66..858f48ce3 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -41,20 +41,10 @@ class ModuleBadChannelExtban : public Module rm = mask.substr(3); status = mh->GetModeChar(); } + for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++) - { - if (InspIRCd::Match(i->chan->name, rm)) - { - if (status) - { - Membership* memb = c->GetUser(user); - if (memb && memb->hasMode(status)) - return MOD_RES_DENY; - } - else - return MOD_RES_DENY; - } - } + if (InspIRCd::Match(i->chan->name, rm) && (!status || i->hasMode(status))) + return MOD_RES_DENY; } return MOD_RES_PASSTHRU; } -- cgit v1.3.1-10-gc9f91