diff options
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 50ed7439b..e413bc4ac 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -281,6 +281,15 @@ bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, use return false; } +command_t* CommandParser::GetHandler(const std::string &commandname) +{ + nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname); + if (n != cmdlist.end()) + return n->second; + + return NULL; +} + // calls a handler function for a command CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, userrec *user) |