diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-04 14:36:09 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-04 14:36:09 +0000 |
commit | bd97c2b002d2a8dcc11510327a45ed26b4a27e43 (patch) | |
tree | 893702e951c961acd871dc4138ecb111b1f942a5 /src | |
parent | 0fad0eb82b396b2f3c72e9d429bde032b564683c (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 22 |
1 files 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"); - } } } } |