diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-16 17:02:42 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-16 17:02:42 +0100 |
commit | b86d7db056a778253f4a971a8be92ffffe0f3f08 (patch) | |
tree | 4413a96d9b5e83e52ba1695b758c69b4caee390e /src/modules | |
parent | 9b8dc77585ada328a306bc12bb9827f083e7cf93 (diff) |
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.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_ircv3_echomessage.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); |