summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-04-16 17:02:42 +0100
committerPeter Powell <petpow@saberuk.com>2018-04-16 17:02:42 +0100
commitb86d7db056a778253f4a971a8be92ffffe0f3f08 (patch)
tree4413a96d9b5e83e52ba1695b758c69b4caee390e /include/modules.h
parent9b8dc77585ada328a306bc12bb9827f083e7cf93 (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 'include/modules.h')
-rw-r--r--include/modules.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index 72aa7b4d7..11bf6d55a 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -214,7 +214,7 @@ enum Implementation
I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart,
I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo,
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNick,
- I_OnUserPostMessage, I_OnMode,
+ I_OnUserPostMessage, I_OnUserMessageBlocked, I_OnMode,
I_OnDecodeMetaData, I_OnAcceptConnection, I_OnUserInit,
I_OnChangeHost, I_OnChangeName, I_OnAddLine, I_OnDelLine, I_OnExpireLine,
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnLoadModule,
@@ -533,6 +533,15 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnUserMessage(User* user, const MessageTarget& target, const MessageDetails& details);
+ /** Called when a message sent by a user to a channel, a user, or a server glob mask is blocked.
+ * @param user The user sending the message.
+ * @param target The target of the message. This can either be a channel, a user, or a server
+ * glob mask.
+ * @param details Details about the message such as the message text and type. See the
+ * MessageDetails class for more information.
+ */
+ virtual void OnUserMessageBlocked(User* user, const MessageTarget& target, const MessageDetails& details);
+
/** Called after every MODE command sent from a user
* Either the usertarget or the chantarget variable contains the target of the modes,
* the actual target will have a non-NULL pointer.