From 085a8a34cb0b1bd97bba76fff15820fb57aa50e4 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 13 Jun 2014 15:40:03 +0200 Subject: Add CommandParser::GetCommands() and typedef CommandMap and use it instead of directly accessing cmdlist --- include/command_parse.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/command_parse.h') diff --git a/include/command_parse.h b/include/command_parse.h index 70544b0c8..bdbc12757 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -29,6 +29,9 @@ */ class CoreExport CommandParser { + public: + typedef Commandtable CommandMap; + private: /** Process a command from a user. * @param user The user to parse the command for @@ -45,6 +48,11 @@ class CoreExport CommandParser */ CommandParser(); + /** Get a command name -> Command* map containing all client to server commands + * @return A map of command handlers keyed by command names + */ + const CommandMap& GetCommands() const { return cmdlist; } + /** Calls the handler for a given command. * @param commandname The command to find. This should be in uppercase. * @param parameters Parameter list -- cgit v1.2.3