diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-29 20:44:31 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:04:08 -0400 |
commit | b8f9116b19eb511c4f5e6a683725f50bf732a7dd (patch) | |
tree | a5848c9797ec4dc3477621fc42211f4985eaec7b /include/modules.h | |
parent | 435c9116e9997634eb7215e998c8f01a5e46fb2c (diff) |
Rewrote all of the command handling to get rid of all the nasty strtoks() everywhere, and added a bot map by uid
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/modules.h b/include/modules.h index 963e07a4c..0acd041f9 100644 --- a/include/modules.h +++ b/include/modules.h @@ -419,13 +419,14 @@ class CoreExport Module virtual void OnUserNickChange(User *u, const std::string &oldnick) { } /** Called immediatly when a user tries to run a command - * @param bi The bot the command is being run from * @param u The user - * @param cmd The command + * @param bi The bot the command is being run from + * @param command The command + * @param message The parameters used for the command * @param c The command class (if it exists) * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it */ - virtual EventReturn OnPreCommandRun(BotInfo *bi, User *u, const ci::string &cmd, Command *c) { return EVENT_CONTINUE; } + virtual EventReturn OnPreCommandRun(User *u, BotInfo *bi, const ci::string &command, const ci::string &message, Command *c) { return EVENT_CONTINUE; } /** Called before a command is due to be executed. * @param u The user executing the command @@ -473,7 +474,7 @@ class CoreExport Module * @param ci The channel it's being used in * @param params The params */ - virtual void OnBotFantasy(char *command, User *u, ChannelInfo *ci, char *params) { } + virtual void OnBotFantasy(const std::string &command, User *u, ChannelInfo *ci, const std::string ¶ms) { } /** Called on fantasy command without access * @param command The command @@ -481,7 +482,7 @@ class CoreExport Module * @param ci The channel it's being used in * @param params The params */ - virtual void OnBotNoFantasyAccess(const char *command, User *u, ChannelInfo *ci, const char *params) { } + virtual void OnBotNoFantasyAccess(const std::string &command, User *u, ChannelInfo *ci, const std::string ¶ms) { } /** Called after a bot joins a channel * @param ci The channael |