summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 11:32:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 11:32:39 +0000
commit7fc980b5b75407fcff9975f34e76460215d387b3 (patch)
tree0c8bdb0b1ac66c8bb5c1093001635efea38d7e51
parent383268af8eaf77ec4285201f9b92f81adee87473 (diff)
Colon stripping fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2000 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 04d14ce71..419d2eb96 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -697,7 +697,7 @@ class TreeSocket : public InspSocket
return false;
}
- std::deque<std::string> Split(std::string line)
+ std::deque<std::string> Split(std::string line, bool stripcolon)
{
std::deque<std::string> n;
std::stringstream s(line);
@@ -710,7 +710,10 @@ class TreeSocket : public InspSocket
if ((param.c_str()[0] == ':') && (item))
{
char* str = (char*)param.c_str();
- str++;
+ if (stripcolon)
+ {
+ str++;
+ }
param = str;
std::string append;
while (!s.eof())
@@ -733,7 +736,8 @@ class TreeSocket : public InspSocket
{
Srv->Log(DEBUG,"inbound-line: '"+line+"'");
- std::deque<std::string> params = this->Split(line);
+ std::deque<std::string> rawparams = this->Split(line,false);
+ std::deque<std::string> params = this->Split(line,true);
std::string command = "";
std::string prefix = "";
if (((params[0].c_str())[0] == ':') && (params.size() > 1))
@@ -875,7 +879,7 @@ class TreeSocket : public InspSocket
return true;
}
}
- return DoOneToAllButSender(prefix,command,params,sourceserv);
+ return DoOneToAllButSender(prefix,command,rawparams,sourceserv);
}
return true;