From c3516b54ee3df9e1c7b92aba610dcf927440b966 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 13 May 2007 17:33:19 +0000 Subject: Make the debug output a bit more readable git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7012 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/utils.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 680fe5eb1..0545f441c 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -41,8 +41,7 @@ */ TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName) { - server_hash::iterator iter; - iter = serverlist.find(ServerName.c_str()); + server_hash::iterator iter = serverlist.find(ServerName.c_str()); if (iter != serverlist.end()) { return iter->second; @@ -55,8 +54,7 @@ TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName) TreeServer* SpanningTreeUtilities::FindRemoteBurstServer(TreeServer* Server) { - server_hash::iterator iter; - iter = RemoteServersBursting.find(Server->GetName().c_str()); + server_hash::iterator iter = RemoteServersBursting.find(Server->GetName().c_str()); if (iter != RemoteServersBursting.end()) return iter->second; else @@ -79,25 +77,25 @@ TreeSocket* SpanningTreeUtilities::FindBurstingServer(const std::string &ServerN void SpanningTreeUtilities::SetRemoteBursting(TreeServer* Server, bool bursting) { - ServerInstance->Log(DEBUG,"Server %s is %sbursting nicknames", Server->GetName().c_str(), bursting ? "" : "no longer "); - server_hash::iterator iter; - iter = RemoteServersBursting.find(Server->GetName().c_str()); + server_hash::iterator iter = RemoteServersBursting.find(Server->GetName().c_str()); if (bursting) { if (iter == RemoteServersBursting.end()) RemoteServersBursting.erase(iter); + else return; } else { if (iter != RemoteServersBursting.end()) RemoteServersBursting.insert(make_pair(Server->GetName(), Server)); + 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; - iter = burstingserverlist.find(ServerName.c_str()); + std::map::iterator iter = burstingserverlist.find(ServerName.c_str()); if (iter == burstingserverlist.end()) burstingserverlist[ServerName.c_str()] = s; } -- cgit v1.2.3