]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1347 from SaberUK/insp20+ctcp-action
authorPeter Powell <petpow@saberuk.com>
Sat, 5 Aug 2017 17:33:54 +0000 (18:33 +0100)
committerGitHub <noreply@github.com>
Sat, 5 Aug 2017 17:33:54 +0000 (18:33 +0100)
[2.0] Fix exempting CTCP ACTIONs in m_blockcaps and m_noctcp.

src/modules/m_blockcaps.cpp
src/modules/m_noctcp.cpp

index 2006936992aa333723efa750548e38acd964030a..7146ee068d421b0cf83525117eaad13355cd7b09 100644 (file)
@@ -67,7 +67,7 @@ public:
        {
                if (target_type == TYPE_CHANNEL)
                {
-                       if ((!IS_LOCAL(user)) || (text.length() < minlen))
+                       if ((!IS_LOCAL(user)) || (text.length() < minlen) || (text == "\1ACTION\1") || (text == "\1ACTION"))
                                return MOD_RES_PASSTHRU;
 
                        Channel* c = (Channel*)dest;
index 1dd6fe34ad467d71617f55b52316685cc9b3e9b7..c934a05c6edbfbe254d17b28f27d8c84d7a1fb5d 100644 (file)
@@ -67,7 +67,7 @@ class ModuleNoCTCP : public Module
                if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        Channel* c = (Channel*)dest;
-                       if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ",8)))
+                       if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ", 8)) || (text == "\1ACTION\1") || (text == "\1ACTION"))
                                return MOD_RES_PASSTHRU;
 
                        ModResult res = ServerInstance->OnCheckExemption(user,c,"noctcp");