summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-01 21:39:51 +0200
committerRobin Burchell <robin+git@viroteck.net>2012-07-01 22:51:43 +0200
commit7f1b71e56bfa336418e57814f3008c319f855024 (patch)
tree7fb6fcc8aa6a07c41478ecf7241ea8737ddf8568
parente6d10930d668038d2367fbe815d000251a069e02 (diff)
m_spanningtree Return when ecountering an invalid command coming from a remote server
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp4
1 files changed, 3 insertions, 1 deletions
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);
}
}