summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index e93dece5f..9c3fe9c36 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -458,6 +458,14 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
return;
}
+ if ((!params.empty()) && (params.back().empty()) && (!cmd->allow_empty_last_param))
+ {
+ // the last param is empty and the command handler doesn't allow that, check if there will be enough params if we drop the last
+ if (params.size()-1 < cmd->min_params)
+ return;
+ params.pop_back();
+ }
+
CmdResult res = cmd->Handle(params, who);
if (res == CMD_INVALID)