summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorRobby <robby@chatbelgie.be>2019-09-18 16:08:12 +0200
committerP. Powell <petpow@saberuk.com>2019-10-24 16:10:34 +0100
commit96925ce0e83e6cdb75a2cb66d9278b8c07b419e1 (patch)
tree898c6e7ccb91abb58d5b9e1237bd703fa1f16302 /src/modules
parent7f4bf231bc4ef27f136a9a29a3ef848a45be54f5 (diff)
m_noctcp: Fix noctcp user mode not applying to exempted channel ops.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_noctcp.cpp16
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: