diff options
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 724a5ced9..0f55793f1 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -415,6 +415,23 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std: params.back().append(who->uuid); who = TreeServer::Get(who)->ServerUser; } + else if ((cmd == "FMODE") && (params.size() >= 2)) + { + // Translate user mode changes with timestamp to MODE + if (params[0][0] != '#') + { + User* user = ServerInstance->FindUUID(params[0]); + if (!user) + return false; + + // Emulate the old nonsensical behavior + if (user->age < ServerCommand::ExtractTS(params[1])) + return false; + + cmd = "MODE"; + params.erase(params.begin()+1); + } + } return true; // Passthru } |