]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Add ProtocolInterface::BroadcastEncap() and infrastructure for manually forwarding...
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 66b8dcd670294b5b09803211f0623de7c2b46c9c..7133b3f053110347f9a9b2d30debd207e73b683c 100644 (file)
@@ -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);
                        }
                }