summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 18:31:50 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 18:31:50 +0000
commitfce0b37ce605e7cf4c4f69fb93483f722f7ccb21 (patch)
tree45cea7ff0322889a14fe18f4546be3dba057da90
parent52bb4498765cf649639de308637c8f19d75aa3cc (diff)
Debug junk
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2159 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 237cf14dd..7bcee9bf6 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1613,19 +1613,19 @@ class ModuleSpanningTree : public Module
{
for (std::vector<Link>::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++)
{
- if (x->AutoConnect)
+ log(DEBUG,"TICK! Autoconnect=%lu, curtime=%lu, NextConnectTime=%lu",x->AutoConnect,(unsigned long)curtime,(unsigned long)x->NextConnectTime);
+ if ((x->AutoConnect) && (curtime >= x->NextConnectTime))
{
+ log(DEBUG,"TICK! AUTOCONNECTING %s",x->Name.c_str());
TreeServer* CheckDupe = FindServer(x->Name);
if (!CheckDupe)
{
+ log(DEBUG,"TICK! Not a dupe!");
// an autoconnected server is not connected. Check if its time to connect it
- if (curtime >= x->NextConnectTime)
- {
- x->NextConnectTime = curtime + x->AutoConnect;
- WriteOpers("*** AUTOCONNECT: Auto-connecting server \002%s\002 (%lu seconds until next attempt)",x->Name.c_str(),x->AutoConnect);
- TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name);
- Srv->AddSocket(newsocket);
- }
+ x->NextConnectTime = curtime + x->AutoConnect;
+ WriteOpers("*** AUTOCONNECT: Auto-connecting server \002%s\002 (%lu seconds until next attempt)",x->Name.c_str(),x->AutoConnect);
+ TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name);
+ Srv->AddSocket(newsocket);
}
}
}