summaryrefslogtreecommitdiff
path: root/src/modules/m_noctcp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_noctcp.cpp')
-rw-r--r--src/modules/m_noctcp.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index dbfe55eac..54960a88e 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -43,10 +43,11 @@ class ModuleNoCTCP : public Module
{
if ((target.type == MessageTarget::TYPE_CHANNEL) && (IS_LOCAL(user)))
{
- Channel* c = target.Get<Channel>();
- if ((details.text.empty()) || (details.text[0] != '\001') || (!strncmp(details.text.c_str(),"\1ACTION ", 8)) || (details.text == "\1ACTION\1") || (details.text == "\1ACTION"))
+ std::string ctcpname;
+ if (!details.IsCTCP(ctcpname) || irc::equals(ctcpname, "ACTION"))
return MOD_RES_PASSTHRU;
+ Channel* c = target.Get<Channel>();
ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp");
if (res == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;