From f0683739e2cfaae900a8e3ffac48ad1bc7d75e51 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 3 Feb 2008 15:04:42 +0000 Subject: Propegate BURST and ENDBURST network-wide for timing of bursts, and to keep XLine application pending until the most opportune moment. Also do some general cleaning up. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8806 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/utils.cpp | 60 ------------------------------------ 1 file changed, 60 deletions(-) (limited to 'src/modules/m_spanningtree/utils.cpp') diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 4e0193727..2143ef11c 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -51,66 +51,6 @@ TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName) } } -TreeServer* SpanningTreeUtilities::FindRemoteBurstServer(TreeServer* Server) -{ - server_hash::iterator iter = RemoteServersBursting.find(Server->GetName().c_str()); - if (iter != RemoteServersBursting.end()) - return iter->second; - else - return NULL; -} - -TreeSocket* SpanningTreeUtilities::FindBurstingServer(const std::string &ServerName) -{ - std::map::iterator iter; - iter = burstingserverlist.find(ServerName.c_str()); - if (iter != burstingserverlist.end()) - { - return iter->second; - } - else - { - return NULL; - } -} - -void SpanningTreeUtilities::SetRemoteBursting(TreeServer* Server, bool bursting) -{ - server_hash::iterator iter = RemoteServersBursting.find(Server->GetName().c_str()); - if (bursting) - { - if (iter == RemoteServersBursting.end()) - RemoteServersBursting.insert(make_pair(Server->GetName(), Server)); - else return; - } - else - { - if (iter != RemoteServersBursting.end()) - RemoteServersBursting.erase(iter); - else return; - } - ServerInstance->Log(DEBUG,"Server %s is %sbursting nicknames", Server->GetName().c_str(), bursting ? "" : "no longer "); -} - -void SpanningTreeUtilities::AddBurstingServer(const std::string &ServerName, TreeSocket* s) -{ - std::map::iterator iter = burstingserverlist.find(ServerName.c_str()); - if (iter == burstingserverlist.end()) - burstingserverlist[ServerName.c_str()] = s; -} - -void SpanningTreeUtilities::DelBurstingServer(TreeSocket* s) -{ - for (std::map::iterator iter = burstingserverlist.begin(); iter != burstingserverlist.end(); iter++) - { - if (iter->second == s) - { - burstingserverlist.erase(iter); - return; - } - } -} - /** Returns the locally connected server we must route a * message through to reach server 'ServerName'. This * only applies to one-to-one and not one-to-many routing. -- cgit v1.2.3