summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-01-22 01:20:08 +0000
committerSadie Powell <sadie@witchery.services>2020-01-22 10:22:02 +0000
commitb759870d742f1611ff64ca899e083d5467ebcf3b (patch)
tree81709b38d716244e1f4258e63a1a056be788c1ed /include/modules.h
parentec66b397b00b32a3b02e9b68c2c9b1017e699572 (diff)
Add an event for when a command is blocked before execution.
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index 1b1684810..5190860fe 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -231,7 +231,7 @@ enum Implementation
I_OnPreChangeHost, I_OnPreTopicChange, I_OnConnectionFail,
I_OnPostTopicChange, I_OnPostConnect, I_OnPostDeoper,
I_OnPreChangeRealName, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
- I_OnPostOper, I_OnPostCommand, I_OnPostJoin,
+ I_OnPostOper, I_OnPostCommand, I_OnCommandBlocked, I_OnPostJoin,
I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass,
I_OnUserMessage, I_OnPassCompare, I_OnNumeric,
I_OnPreRehash, I_OnModuleRehash, I_OnChangeIdent, I_OnSetUserIP,
@@ -739,6 +739,13 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnPostCommand(Command* command, const CommandBase::Params& parameters, LocalUser* user, CmdResult result, bool loop);
+ /** Called when a command was blocked before it could be executed.
+ * @param command The command being executed.
+ * @param parameters The parameters for the command.
+ * @param user The user issuing the command.
+ */
+ virtual void OnCommandBlocked(const std::string& command, const CommandBase::Params& parameters, LocalUser* user);
+
/** Called after a user object is initialised and added to the user list.
* When this is called the user has not had their I/O hooks checked or had their initial
* connect class assigned and may not yet have a serialiser. You probably want to use