diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-03 21:42:54 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-03 21:42:54 +0000 |
commit | 57f2915b8ba91004925aa1e8a6b29b441663a07c (patch) | |
tree | 0e7b53a0b084827b7c19cdc763a3a761b8830ba5 /src/modules/m_spanningtree/compat.cpp | |
parent | 9f050cf19594ce424ec50c8469d49157a6f2fe75 (diff) |
Forge FIDENT reply to CHGIDENT to prevent ident desync with 1.2 and 2.0 servers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12365 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index d39d8e876..73b7ccb62 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -164,6 +164,16 @@ void TreeSocket::WriteLine(std::string line) subcmd.c_str()); line.erase(a, c-a); } + if (subcmd == "CHGIDENT" && d != std::string::npos) + { + std::string::size_type e = line.find(' ', d + 1); + if (e == std::string::npos) + return; // not valid + std::string target = line.substr(d + 1, e - d - 1); + + ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Forging acceptance of CHGIDENT from 1201-protocol server"); + recvq.insert(0, ":" + target + " FIDENT " + line.substr(e) + "\n"); + } } } } |