summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-02 05:33:10 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-02 05:33:10 +0000
commit4c83624ed825ca123401a45c8d2844ba6453a85b (patch)
tree05aec86ee0728b9943b4043aa8cabad297beb262 /src/modules/m_spanningtree/main.cpp
parent8bcec56a93c8998f6ca9ac9e0a3c1b57e7bcd59c (diff)
Fixed an issue that could cause empty parameters in module commands to not be sent to other servers properly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8012 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 6d71fc872..4e92f07a6 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -822,6 +822,10 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const char**
int n_translate = thiscmd->translation.size();
TranslateType translate_to;
+ /* To make sure that parameters with spaces, or empty
+ * parameters, etc, are always sent properly, *always*
+ * prefix the last parameter with a :. This also removes
+ * an extra strchr() */
for (int j = 0; j < pcnt; j++)
{
std::string target;
@@ -837,8 +841,8 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const char**
ServerInstance->Log(DEBUG,"TRANSLATION: %s - type is %d", parameters[j], translate_to);
ServerInstance->Parser->TranslateUIDs(translate_to, parameters[j], target);
-
- if (strchr(parameters[j],' '))
+
+ if (j == (pcnt - 1))
params.push_back(":" + target);
else
params.push_back(target);