summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 17:33:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 17:33:19 +0000
commitc3516b54ee3df9e1c7b92aba610dcf927440b966 (patch)
tree260b0a66de9080f3faf1f60317980e006556c59d /src
parenta07e365fe1833a47de95a1390a0c37d0664d8cce (diff)
Make the debug output a bit more readable
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7012 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/utils.cpp16
1 files changed, 7 insertions, 9 deletions
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<irc::string,TreeSocket*>::iterator iter;
- iter = burstingserverlist.find(ServerName.c_str());
+ std::map<irc::string,TreeSocket*>::iterator iter = burstingserverlist.find(ServerName.c_str());
if (iter == burstingserverlist.end())
burstingserverlist[ServerName.c_str()] = s;
}