diff options
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index f04b69e8f..a7c46cdc6 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -229,6 +229,24 @@ void TreeSocket::WriteLine(std::string line) line.erase(c, d-c); } } + else if (proto_version < 1204 && command == "FTOPIC") + { + // Drop channel TS for FTOPIC + // :sid FTOPIC #target TS TopicTS ... + // A B C D + if (b == std::string::npos) + return; + std::string::size_type c = line.find(' ', b + 1); + if (c == std::string::npos) + return; + + std::string::size_type d = line.find(' ', c + 1); + if (d == std::string::npos) + return; + + ServerInstance->Logs->Log("m_spanningtree", DEBUG, "Stripping channel TS in FTOPIC for pre-1204-protocol server"); + line.erase(c, d-c); + } } ServerInstance->Logs->Log("m_spanningtree", RAWIO, "S[%d] O %s", this->GetFd(), line.c_str()); |
