diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 9561442b5..ad3a5fee8 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -178,7 +178,7 @@ namespace bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std::vector<std::string>& params) { - if ((cmd == "METADATA") && (params.size() >= 3)) + if ((cmd == "METADATA") && (params.size() >= 3) && (params[0][0] == '#')) { // :20D METADATA #channel extname :extdata return InsertCurrentChannelTS(params); @@ -242,6 +242,10 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std: params.swap(p); } + else if (cmd == "SVSMODE") + { + cmd = "MODE"; + } return true; // Passthru } diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 8b8aafd9e..328bb3c72 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -303,13 +303,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, return; } - /* - * First up, check for any malformed commands (e.g. MODE without a timestamp) - * and rewrite commands where necessary (SVSMODE -> MODE for services). -- w - */ - if (command == "SVSMODE") // This isn't in an "else if" so we still force FMODE for changes on channels. - command = "MODE"; - + // Translate commands coming from servers using an older protocol if (proto_version < ProtocolVersion) { if (!PreProcessOldProtocolMessage(who, command, params)) |