summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/treesocket.h4
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h
index be5455bce..13dfad3f1 100644
--- a/src/modules/m_spanningtree/treesocket.h
+++ b/src/modules/m_spanningtree/treesocket.h
@@ -315,6 +315,10 @@ class TreeSocket : public BufferedSocket
/** Handle server quit on close
*/
virtual void Close();
+
+ /** Returns true if this server was introduced to the rest of the network
+ */
+ bool Introduced();
};
#endif
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index dcb35af31..7804c870d 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -183,7 +183,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
{
DelServerEvent(Utils->Creator, Current->GetName());
- if (!Current->GetSocket() || Current->GetSocket()->GetLinkState() == CONNECTED)
+ if (!Current->GetSocket() || Current->GetSocket()->Introduced())
{
parameterlist params;
params.push_back(Current->GetName());
@@ -245,3 +245,8 @@ void TreeSocket::OnDataReady()
SendError("RecvQ overrun (line too long)");
Utils->Creator->loopCall = false;
}
+
+bool TreeSocket::Introduced()
+{
+ return (capab == NULL);
+}