]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/command_parse.h
Add CommandParser::GetCommands() and typedef CommandMap and use it instead of directl...
[user/henk/code/inspircd.git] / include / command_parse.h
index 70544b0c8e17d1752d6f67814e5b0c2bbab10e9d..bdbc12757ecfea56c1f9d3147879058b954538e6 100644 (file)
@@ -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