From 42fdbb7234628ff95acdb6f3f1d1d2206ad77334 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 20 Jul 2024 12:31:31 +0100 Subject: Fix broadcasting UID messages to v3 servers. We have to use the compat layer here as broadcast messages do not go through the command builder. --- src/modules/m_spanningtree/compat.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/modules/m_spanningtree/compat.cpp') diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 197b0e73c..8bfe1a15e 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -114,6 +114,19 @@ void TreeSocket::WriteLine(const std::string& original_line) // SQUERY was introduced in PROTO_INSPIRCD_4; convert to PRIVMSG. line.replace(cmdstart, 6, "PRIVMSG"); } + else if (irc::equals(command, "UID")) + { + // : UID [] : + // ^^^^^^ New in 1206 + size_t uuidend = NextToken(line, cmdend); + size_t nickchangedend = NextToken(line, uuidend); + size_t nickend = NextToken(line, nickchangedend); + size_t hostend = NextToken(line, nickend); + size_t dhostend = NextToken(line, hostend); + size_t userend = NextToken(line, dhostend); + if (userend != std::string::npos) + line.erase(dhostend, userend - dhostend); + } } WriteLineInternal(line); -- cgit v1.3.1-10-gc9f91