]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/capab.cpp
Same here
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / capab.cpp
index 744e827bfb7ddfae3563441a57b7964231a64dfa..aa69e2ee6ab4956a41ad8a109ba0c1e6ec11c649 100644 (file)
  */
 
 #include "inspircd.h"
-#include "commands/cmd_whois.h"
-#include "commands/cmd_stats.h"
-#include "socket.h"
-#include "wildcard.h"
 #include "xline.h"
-#include "transport.h"
-#include "m_hash.h"
-#include "socketengine.h"
 
-#include "m_spanningtree/main.h"
-#include "m_spanningtree/utils.h"
-#include "m_spanningtree/treeserver.h"
-#include "m_spanningtree/link.h"
 #include "m_spanningtree/treesocket.h"
-#include "m_spanningtree/resolvers.h"
-#include "m_spanningtree/handshaketimer.h"
+#include "m_spanningtree/treeserver.h"
+#include "m_spanningtree/utils.h"
+#include "m_spanningtree/main.h"
+
+/* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
 
-/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */
 
 std::string TreeSocket::MyCapabilities()
 {
@@ -210,6 +201,7 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
                        this->SetTheirChallenge(n->second);
                        if (!this->GetTheirChallenge().empty() && (this->LinkState == CONNECTING))
                        {
+                               this->SendCapabilities();
                                this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(OutboundPass, this->GetTheirChallenge())+" 0 "+
                                                Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc);
                        }
@@ -218,7 +210,10 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
                {
                        /* They didnt specify a challenge or we don't have m_sha256.so, we use plaintext */
                        if (this->LinkState == CONNECTING)
+                       {
+                               this->SendCapabilities();
                                this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 "+Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc);
+                       }
                }
 
                if (reason.length())