]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Link m_ldap against libldap_r
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index 8dd62a1e9ec5818cda29bbc6918813953006f1e5..1a8bdd06c67055468a17ab301c6d338f12054d5f 100644 (file)
@@ -128,6 +128,7 @@ void TreeSocket::OnError(BufferedSocketError e)
        ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\002%s\002' failed with error: %s",
                linkID.c_str(), getError().c_str());
        LinkState = DYING;
+       Close();
 }
 
 void TreeSocket::SendError(const std::string &errormessage)
@@ -153,6 +154,8 @@ CmdResult CommandSQuit::HandleServer(TreeServer* server, std::vector<std::string
                ret = CMD_FAILURE;
                server = server->GetParent();
        }
+       else if (quitting->GetParent() != server)
+               throw ProtocolException("Attempted to SQUIT a non-directly connected server or the parent");
 
        server->SQuitChild(quitting, params[1]);