diff options
| author | 2018-04-27 14:30:06 +0100 | |
|---|---|---|
| committer | 2018-08-26 11:33:19 +0100 | |
| commit | 4567a325b8cfc87ddf1aea1c0db7623d3b068931 (patch) | |
| tree | 6f822c442abff8174c0e375b0d088a5dbfb08fa4 /src/modules/m_noctcp.cpp | |
| parent | Improve the snotices sent out by the filter module. (diff) | |
Implement proper CTCP parsing in MessageDetails.
Diffstat (limited to 'src/modules/m_noctcp.cpp')
| -rw-r--r-- | src/modules/m_noctcp.cpp | 5 |
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; |
