summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-14 14:31:40 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-14 14:31:40 +0000
commitd1bfdcb61347264fbef6656de88ab6e30d9fc617 (patch)
tree30656535b73ce665d5c6df5e1b3c5af14d752b67 /src
parentcf18f3f7f85d3e510edcbd5dbdd197e513c5fac1 (diff)
Mark children of remote servers as bursting while their parent is bursting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11217 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/server.cpp1
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp12
-rw-r--r--src/modules/m_spanningtree/treeserver.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp
index da44452ba..4515dbd93 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -80,6 +80,7 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string>
params[4] = ":" + params[4];
Utils->DoOneToAllButSender(prefix,"SERVER",params,prefix);
this->ServerInstance->SNO->WriteToSnoMask('L', "Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")");
+ Node->bursting = true;
return true;
}
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 6c3e0f87d..7520da484 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -139,9 +139,19 @@ std::string& TreeServer::GetID()
return sid;
}
-void TreeServer::FinishBurst()
+void TreeServer::FinishBurstInternal()
{
this->bursting = false;
+ for(unsigned int q=0; q < ChildCount(); q++)
+ {
+ TreeServer* child = GetChild(q);
+ child->FinishBurstInternal();
+ }
+}
+
+void TreeServer::FinishBurst()
+{
+ FinishBurstInternal();
ServerInstance->XLines->ApplyLines();
timeval t;
gettimeofday(&t, NULL);
diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h
index 07e586c62..95b7469f9 100644
--- a/src/modules/m_spanningtree/treeserver.h
+++ b/src/modules/m_spanningtree/treeserver.h
@@ -196,6 +196,8 @@ class TreeServer : public classbase
/** Marks a server as having finished bursting and performs appropriate actions.
*/
void FinishBurst();
+ /** Recursive call for child servers */
+ void FinishBurstInternal();
/** Destructor
*/