diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 5893a09fd..b9c7e6940 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -246,7 +246,17 @@ void TreeSocket::WriteLine(const std::string& original_line) } else if (command == "SINFO") { - return; + // :22D SINFO version :InspIRCd-2.2 + // A B C + std::string::size_type c = line.find(' ', b + 1); + if (c == std::string::npos) + return; + + // Only translating SINFO version, discard everything else + if (line.compare(b, 9, " version ", 9)) + return; + + line = line.substr(0, 5) + "VERSION" + line.substr(c); } } ServerInstance->Logs->Log(MODNAME, LOG_RAWIO, "S[%d] O %s", this->GetFd(), line.c_str()); @@ -383,6 +393,14 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std: // Insert channel timestamp after the channel name; the 3rd parameter, if there, is the invite expiration time return InsertCurrentChannelTS(params, 1, 2); } + else if (cmd == "VERSION") + { + // :20D VERSION :InspIRCd-2.0 + // change to + // :20D SINFO version :InspIRCd-2.0 + cmd = "SINFO"; + params.insert(params.begin(), "version"); + } return true; // Passthru } |