diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-24 12:58:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-24 12:58:01 +0100 |
commit | 932e8d13f81c7c94a89dc3702f6d45bc185f5dcf (patch) | |
tree | cb50264af2ff50ccf8070ce9123ee350d95ff7f8 /src/modules/m_channelban.cpp | |
parent | 9a962e1c512ffc00bcfce105e9dbdabd9abcdd86 (diff) |
Convert UserChanList to an intrusively linked list
Diffstat (limited to 'src/modules/m_channelban.cpp')
-rw-r--r-- | src/modules/m_channelban.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index 3260c0fa4..300caa123 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -42,15 +42,9 @@ class ModuleBadChannelExtban : public Module } for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++) { - if (InspIRCd::Match((**i).name, rm)) + if (InspIRCd::Match((*i)->chan->name, rm)) { - if (status) - { - Membership* memb = (**i).GetUser(user); - if (memb && memb->hasMode(status)) - return MOD_RES_DENY; - } - else + if (!status || (*i)->hasMode(status)) return MOD_RES_DENY; } } |