diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/config.h | 4 | ||||
| -rw-r--r-- | include/modules.h | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/include/config.h b/include/config.h index de68d3105..f4f164b37 100644 --- a/include/config.h +++ b/include/config.h @@ -688,6 +688,10 @@ class CoreExport ServerConfig std::list<OperType *> MyOperTypes; /* List of pairs of opers and their opertype from the config */ std::vector<Oper *> Opers; + + /* Map of fantasy commands */ + typedef Anope::insensitive_map<CommandInfo> fantasy_map; + fantasy_map Fantasy; }; /** This class can be used on its own to represent an exception, or derived to represent a module-specific exception. diff --git a/include/modules.h b/include/modules.h index 14fdff066..627bbab59 100644 --- a/include/modules.h +++ b/include/modules.h @@ -348,20 +348,22 @@ class CoreExport Module : public Extensible virtual EventReturn OnDecrypt(const Anope::string &hashm, const Anope::string &src, Anope::string &dest) { return EVENT_CONTINUE; } /** Called on fantasy command - * @param command The command - * @param u The user using the command + * @param source The source of the command + * @param c The command * @param ci The channel it's being used in * @param params The params + * @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed */ - virtual void OnBotFantasy(const Anope::string &command, User *u, ChannelInfo *ci, const Anope::string ¶ms) { } + virtual EventReturn OnBotFantasy(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; } /** Called on fantasy command without access - * @param command The command - * @param u The user using the command + * @param source The source of the command + * @param c The command * @param ci The channel it's being used in * @param params The params + * @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed */ - virtual void OnBotNoFantasyAccess(const Anope::string &command, User *u, ChannelInfo *ci, const Anope::string ¶ms) { } + virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; } /** Called after a bot joins a channel * @param c The channel |
