From 7f1b71e56bfa336418e57814f3008c319f855024 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 1 Jul 2012 21:39:51 +0200 Subject: m_spanningtree Return when ecountering an invalid command coming from a remote server --- src/modules/m_spanningtree/treesocket2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index cb49d92c9..e6fbad4c6 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -440,6 +440,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Unrecognised S2S command :%s %s %s", who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Unrecognised command '" + command + "' -- possibly loaded mismatched modules"); + return; } if (params.size() < cmd->min_params) @@ -448,6 +449,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Insufficient parameters for S2S command :%s %s %s", who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Insufficient parameters for command '" + command + "'"); + return; } CmdResult res = cmd->Handle(params, who); @@ -459,7 +461,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Error handling '" + command + "' -- possibly loaded mismatched modules"); } - if (res == CMD_SUCCESS) + else if (res == CMD_SUCCESS) Utils->RouteCommand(route_back_again, command, params, who); } } -- cgit v1.2.3