diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-12 20:08:22 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-12 20:08:22 +0200 |
commit | 98f3924960d849691abc81e0928dc43ad9233b01 (patch) | |
tree | 58bccb259cdbec8cb3aa5677eb8d05799ab55bbb /src/modules/m_spanningtree/postcommand.cpp | |
parent | c23d09f65084e6088111dc974f0e290b042de89d (diff) |
Change command name parameter of OnPostCommand to be a Command*
Diffstat (limited to 'src/modules/m_spanningtree/postcommand.cpp')
-rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index 551ce06d5..8ff7ce29a 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -25,20 +25,15 @@ /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h */ -void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, LocalUser *user, CmdResult result, const std::string &original_line) +void ModuleSpanningTree::OnPostCommand(Command* command, const std::vector<std::string>& parameters, LocalUser* user, CmdResult result, const std::string& original_line) { if (result == CMD_SUCCESS) Utils->RouteCommand(NULL, command, parameters, user); } -void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &command, const parameterlist& parameters, User *user) +void SpanningTreeUtilities::RouteCommand(TreeServer* origin, Command* thiscmd, const parameterlist& parameters, User* user) { - if (!ServerInstance->Parser->IsValidCommand(command, parameters.size(), user)) - return; - - /* We know it's non-null because IsValidCommand returned true */ - Command* thiscmd = ServerInstance->Parser->GetHandler(command); - + const std::string& command = thiscmd->name; RouteDescriptor routing = thiscmd->GetRouting(user, parameters); std::string sent_cmd = command; |