summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 66b8dcd67..7133b3f05 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -118,7 +118,7 @@ Command* CommandParser::GetHandler(const std::string &commandname)
// calls a handler function for a command
-CmdResult CommandParser::CallHandler(const std::string &commandname, const std::vector<std::string>& parameters, User *user)
+CmdResult CommandParser::CallHandler(const std::string& commandname, const std::vector<std::string>& parameters, User* user, Command** cmd)
{
Commandtable::iterator n = cmdlist.find(commandname);
@@ -150,6 +150,8 @@ CmdResult CommandParser::CallHandler(const std::string &commandname, const std::
if (bOkay)
{
+ if (cmd)
+ *cmd = n->second;
return n->second->Handle(parameters,user);
}
}