summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/postcommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/postcommand.cpp')
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index 448bb3b54..d3eab825f 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -101,7 +101,10 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, CommandBase* thiscm
return;
// TODO OnBuildExemptList hook was here
CUList exempts;
- SendChannelMessage(user->uuid, c, parameters[1], pfx, parameters.GetTags(), exempts, command.c_str(), origin ? origin->GetSocket() : NULL);
+ std::string message;
+ if (parameters.size() >= 2)
+ message.assign(parameters[1]);
+ SendChannelMessage(user->uuid, c, message, pfx, parameters.GetTags(), exempts, command.c_str(), origin ? origin->GetSocket() : NULL);
}
else if (dest[0] == '$')
{