From bd97c2b002d2a8dcc11510327a45ed26b4a27e43 Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 4 Feb 2010 14:36:09 +0000 Subject: Fix FIDENT response forging to run prior to the ENCAP strip git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12372 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/compat.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 73b7ccb62..2df0c91e9 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -154,6 +154,18 @@ void TreeSocket::WriteLine(std::string line) return; std::string::size_type d = line.find(' ', c + 1); std::string subcmd = line.substr(c + 1, d - c - 1); + + 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"); + } + Command* thiscmd = ServerInstance->Parser->GetHandler(subcmd); if (thiscmd) { @@ -164,16 +176,6 @@ 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"); - } } } } -- cgit v1.2.3