aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/compat.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-07-20 12:31:31 +0100
committerGravatar Sadie Powell2024-07-20 12:33:37 +0100
commit42fdbb7234628ff95acdb6f3f1d1d2206ad77334 (patch)
treea8f3bb09c880d96f886f8a44f4bb0b7119922022 /src/modules/m_spanningtree/compat.cpp
parentImplement support for the IRCv3 WebSocket subprotocol names. (diff)
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.
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
-rw-r--r--src/modules/m_spanningtree/compat.cpp13
1 files changed, 13 insertions, 0 deletions
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"))
+ {
+ // :<sid> UID <uuid> <nickchanged> <nick> <host> <dhost> <user> <duser> <ip.string> <signon> <modes> [<modepara>] :<real>
+ // ^^^^^^ 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);