summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-22 18:01:15 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-22 18:01:15 +0000
commitcb6917c48eceeaa0f9980d8efbec8b23fc91d3bf (patch)
tree3874048cf247ff5bde799e1cdecefbcab69670d8 /include/modules.h
parent30c8606724660f911bb16e90f216cf7b72090b2e (diff)
Add OnSendSnotice(char &, std::string &, const std::string &) to modify/block/notify about snotices being sent to users.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10221 e03df62e-2008-0410-955e-edbf42e46eb7
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 f527cb065..3aa7a94ac 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -384,7 +384,7 @@ enum Priority { PRIORITY_FIRST, PRIORITY_DONTCARE, PRIORITY_LAST, PRIORITY_BEFOR
enum Implementation
{
I_BEGIN,
- I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnRehash, I_OnServerRaw,
+ I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnRehash, I_OnServerRaw, I_OnSendSnotice,
I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo, I_OnWhois, I_OnUserPreInvite,
I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreNick, I_OnUserMessage, I_OnUserNotice, I_OnMode,
I_OnGetServerDescription, I_OnSyncUser, I_OnSyncChannel, I_OnSyncChannelMetaData, I_OnSyncUserMetaData,
@@ -527,6 +527,15 @@ class CoreExport Module : public Extensible
*/
virtual void OnServerRaw(std::string &raw, bool inbound, User* user);
+ /** Called whenever a snotice is about to be sent to a snomask.
+ * snomask and type may both be modified; the message may not.
+ * @param snomask The snomask the message is going to (e.g. 'A')
+ * @param type The textual description the snomask will go to (e.g. 'OPER')
+ * @param message The text message to be sent via snotice
+ * @return 1 to block the snotice from being sent entirely, 0 else.
+ */
+ virtual int OnSendSnotice(char &snomask, std::string &type, const std::string &message);
+
/** Called whenever a user is about to join a channel, before any processing is done.
* Returning a value of 1 from this function stops the process immediately, causing no
* output to be sent to the user by the core. If you do this you must produce your own numerics,