summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-04-03 00:16:15 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-04-03 00:16:15 +0000
commitc6ef1e0390abe38404742d2355145d6f671ca2dc (patch)
tree07a5ae72de7c61f282895efa3e03f11ce5faca5e /include/modules.h
parent48ef6617acff38cdce32233d447c4317b61ab048 (diff)
Added service argument to OnPreCommand, added OnPostCommand event, changed the following modules to use On[Pre|Post]Command instead of hooking into existing commands: hs_request, ns_maxemail, and os_info.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2242 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index ca37fe4c9..153d56853 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -506,11 +506,20 @@ class CoreExport Module
/** Called before a command is due to be executed.
* @param u The user executing the command
+ * @param service The service the command is associated with
* @param command The command the user is executing
* @param params The parameters the user is sending
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
*/
- virtual EventReturn OnPreCommand(User *u, const std::string &command, const std::vector<std::string> &params) { return EVENT_CONTINUE; }
+ virtual EventReturn OnPreCommand(User *u, const std::string &service, const std::string &command, const std::vector<std::string> &params) { return EVENT_CONTINUE; }
+
+ /** Called after a command has been executed.
+ * @param u The user executing the command
+ * @param service The service the command is associated with
+ * @param command The command the user executed
+ * @param params The parameters the user sent
+ */
+ virtual void OnPostCommand(User *u, const std::string &service, const std::string &command, const std::vector<std::string> &params) { }
/** Called when anope saves databases.
* NOTE: This event is deprecated pending new database handling.
@@ -531,7 +540,7 @@ enum Implementation
{
I_BEGIN,
I_OnUserKicked, I_OnReload, I_OnBotAssign, I_OnBotUnAssign, I_OnUserConnect, I_OnServerConnect,
- I_OnPreCommand,
+ I_OnPreCommand, I_OnPostCommand,
I_OnSaveDatabase, I_OnBackupDatabase,
I_END
};