From 3dec85fc94b6c2e9702069c0fc5f55c1e1382c02 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 29 Nov 2005 11:45:12 +0000 Subject: [PATCH] Changed the way lines are populated to remote servers git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2002 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 367e5290d..20d036f8b 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -724,10 +724,6 @@ class TreeSocket : public InspSocket } } item++; - if ((strchr(param.c_str(),' ')) && (!stripcolon)) - { - param = ":"+param; - } n.push_back(param); } return n; @@ -736,8 +732,6 @@ class TreeSocket : public InspSocket bool ProcessLine(std::string line) { Srv->Log(DEBUG,"inbound-line: '"+line+"'"); - - std::deque rawparams = this->Split(line,false); std::deque params = this->Split(line,true); std::string command = ""; std::string prefix = ""; @@ -880,7 +874,7 @@ class TreeSocket : public InspSocket return true; } } - return DoOneToAllButSender(prefix,command,rawparams,sourceserv); + return DoOneToAllButSenderRaw(line,sourceserv); } return true; @@ -926,6 +920,20 @@ class TreeSocket : public InspSocket } }; +bool DoOneToAllButSenderRaw(std::string data,std::string omit) +{ + for (unsigned int x = 0; x < TreeRoot->ChildCount(); x++) + { + TreeServer* Route = TreeRoot->GetChild(x); + if ((Route->GetSocket()) && (Route->GetName() != omit) && (BestRouteTo(omit) != Route)) + { + TreeSocket* Sock = Route->GetSocket(); + log(DEBUG,"Sending RAW to %s",Route->GetName().c_str()); + Sock->WriteLine(FullLine); + } + } +} + bool DoOneToAllButSender(std::string prefix, std::string command, std::deque params, std::string omit) { log(DEBUG,"ALLBUTONE: Comes from %s SHOULD NOT go back to %s",prefix.c_str(),omit.c_str()); -- 2.39.2