summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 18:38:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 18:38:51 +0000
commitcf6c6cd7d41561c020e0f96ab1c36090a78cb8aa (patch)
tree8c65cf70bda403fe9e50bb16b9ed897b62717a52 /src/modules
parentfce0b37ce605e7cf4c4f69fb93483f722f7ccb21 (diff)
Changed autoconnect to not take as much resources
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2160 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 7bcee9bf6..4b446aa3c 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1613,16 +1613,14 @@ class ModuleSpanningTree : public Module
{
for (std::vector<Link>::iterator x = LinkBlocks.begin(); x < LinkBlocks.end(); x++)
{
- 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());
+ log(DEBUG,"Auto-Connecting %s",x->Name.c_str());
+ x->NextConnectTime = curtime + x->AutoConnect;
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
- 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);