From 7fc980b5b75407fcff9975f34e76460215d387b3 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 29 Nov 2005 11:32:39 +0000 Subject: [PATCH] Colon stripping fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2000 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 12 ++++++++---- 1 file 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 Split(std::string line) + std::deque Split(std::string line, bool stripcolon) { std::deque 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 params = this->Split(line); + std::deque rawparams = this->Split(line,false); + std::deque 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; -- 2.39.5