From 3629e99c15a6ee5acd7d6015bc0b8fad1285b671 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 2 Sep 2021 11:44:47 +0100 Subject: Add the FRHOST command to allow changing a remote user's real host. Closes #1803. --- src/modules/m_spanningtree/compat.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 85b7ec007..7e3c6fcd5 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -47,7 +47,12 @@ void TreeSocket::WriteLine(const std::string& original_line) std::string command(line, cmdstart + 1, cmdend - cmdstart - 1); if (proto_version == PROTO_INSPIRCD_3) { - if (irc::equals(command, "SQUERY")) + if (irc::equals(command, "FRHOST")) + { + // FRHOST was introduced in PROTO_INSPIRCD_4; drop it. + return; + } + else if (irc::equals(command, "SQUERY")) { // SQUERY was introduced in PROTO_INSPIRCD_4; convert to PRIVMSG. line.replace(cmdstart + 1, cmdend - cmdstart - 1, "PRIVMSG"); -- cgit v1.3.1-10-gc9f91