]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix FIDENT response forging to run prior to the ENCAP strip
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 4 Feb 2010 14:36:09 +0000 (14:36 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 4 Feb 2010 14:36:09 +0000 (14:36 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12372 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/compat.cpp

index 73b7ccb621d972d325297697c224f48437012412..2df0c91e98b0969e2ab723d1f40c7b58e6c82729 100644 (file)
@@ -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");
-                                       }
                                }
                        }
                }