From b86d7db056a778253f4a971a8be92ffffe0f3f08 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 16 Apr 2018 17:02:42 +0100 Subject: Call OnUserMessageBlocked when a PRIVMSG or a NOTICE is blocked. This is necessary to allow m_ircv3_echomessage to pretend that a message was echoed successfully. This is useful as it doesn't let spammers know that their message was blocked. --- src/modules/m_ircv3_echomessage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_ircv3_echomessage.cpp b/src/modules/m_ircv3_echomessage.cpp index c2818700f..056b02194 100644 --- a/src/modules/m_ircv3_echomessage.cpp +++ b/src/modules/m_ircv3_echomessage.cpp @@ -61,6 +61,13 @@ class ModuleIRCv3EchoMessage : public Module user->WriteFrom(user, msg); } + void OnUserMessageBlocked(User* user, const MessageTarget& target, const MessageDetails& details) CXX11_OVERRIDE + { + // Prevent spammers from knowing that their spam was blocked. + if (details.echooriginal) + OnUserPostMessage(user, target, details); + } + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the echo-message IRCv3.2 extension", VF_VENDOR); -- cgit v1.2.3