aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Jackmcbarn2011-01-30 11:37:56 -0500
committerGravatar Jackmcbarn2011-01-30 11:37:56 -0500
commitca8a7481bdf37a08f8d406121def4173c7d4e377 (patch)
treedd15617a5a64cc8ab86456eb355b01cd0255508e /src/modules
parentFix PURE_STATIC compile (diff)
Fix bug #83
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_channelban.cpp16
1 files changed, 3 insertions, 13 deletions
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;
}