diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 14 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 83ad77414..9f25f251d 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -280,6 +280,15 @@ void TreeSocket::WriteLine(const std::string& original_line) line.erase(d, spcolon-d); line.insert(c, " * 0"); + + if (burstsent) + { + WriteLineNoCompat(line); + + // Synthesize a :<newserver> BURST <time> message + spcolon = line.find(" :"); + line = CmdBuilder(line.substr(spcolon-3, 3), "BURST").push_int(ServerInstance->Time()).str(); + } } } WriteLineNoCompat(line); @@ -461,6 +470,11 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std: params[1].swap(params[3]); params.erase(params.begin()+2, params.begin()+4); } + else if (cmd == "BURST") + { + // A server is introducing another one, drop unnecessary BURST + return false; + } return true; // Passthru } diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index e5989bd28..ef371212a 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -169,8 +169,6 @@ void TreeSocket::ProcessLine(std::string &line) return; FinishAuth(capab->name, capab->sid, capab->description, capab->hidden); - - CmdBuilder(MyRoot->GetID(), "BURST").insert(params).Forward(MyRoot); } else if (command == "ERROR") { |