diff options
-rw-r--r-- | src/modules/m_noctcp.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 475151cb7..45f805ac9 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -69,6 +69,14 @@ class ModuleNoCTCP : public Module return MOD_RES_PASSTHRU; Channel* c = target.Get<Channel>(); + const Channel::MemberMap& members = c->GetUsers(); + for (Channel::MemberMap::const_iterator member = members.begin(); member != members.end(); ++member) + { + User* u = member->first; + if (u->IsModeSet(ncu)) + details.exemptions.insert(u); + } + ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp"); if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; @@ -78,14 +86,6 @@ class ModuleNoCTCP : public Module user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send CTCP to channel (+C is set)"); return MOD_RES_DENY; } - - const Channel::MemberMap& members = c->GetUsers(); - for (Channel::MemberMap::const_iterator member = members.begin(); member != members.end(); ++member) - { - User* u = member->first; - if (u->IsModeSet(ncu)) - details.exemptions.insert(u); - } break; } case MessageTarget::TYPE_USER: |