From b759870d742f1611ff64ca899e083d5467ebcf3b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 22 Jan 2020 01:20:08 +0000 Subject: Add an event for when a command is blocked before execution. --- include/modules.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3