diff options
Diffstat (limited to 'include/commands.h')
-rw-r--r-- | include/commands.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/commands.h b/include/commands.h index d4de074fe..06bb74c7b 100644 --- a/include/commands.h +++ b/include/commands.h @@ -163,8 +163,21 @@ class CoreExport Command : public Service * @param subcommand The subcommand the user tried to use */ virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand); -}; -extern CoreExport void RunCommand(CommandSource &source, const Anope::string &message); + /** Runs a command + * @param source The source of the command + * @param message The full message to run, the command is at the beginning of the message + */ + static void Run(CommandSource &source, const Anope::string &message); + + /** Looks up a command name from the service name. + * Note that if the same command exists multiple places this will return the first one encountered + * @param command_service The command service to lookup, eg, nickserv/register + * @param bot If found, is set to the bot the command is on, eg NickServ + * @param name If found, is set to the comand name, eg REGISTER + * @return true if the given command service exists + */ + static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name); +}; #endif // COMMANDS_H |