X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Futils.cpp;h=f6e3ad6bd337303debe8a49b74a9dc52e3be53cb;hb=4e6997fddf8eba872584830e0d56c8de83b76aab;hp=c6c9ae700f2c3a3fa269a88f000d41524e9f0b40;hpb=c9d94ba9cd653574ce4aba06d13b130f7a175480;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index c6c9ae700..f6e3ad6bd 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -48,7 +48,7 @@ void ServerSocketListener::OnAcceptReady(const std::string &ipconnectedto, int n if (!found) { - Utils->Creator->RemoteMessage(NULL,"Server connection from %s denied (no link blocks with that IP address)", ip); + this->ServerInstance->SNO->WriteToSnoMask('l', "Server connection from %s denied (no link blocks with that IP address)", ip); ServerInstance->SE->Close(newsock); return; } @@ -536,7 +536,9 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind) } - L.NextConnectTime = time(NULL) + L.AutoConnect; + // Fix: Only trip autoconnects if this wouldn't delay autoconnect.. + if (L.NextConnectTime > ((time_t)(ServerInstance->Time() + L.AutoConnect))) + L.NextConnectTime = ServerInstance->Time() + L.AutoConnect; if (L.Name.find('.') == std::string::npos) throw CoreException("The link name '"+assign(L.Name)+"' is invalid and must contain at least one '.' character"); @@ -628,7 +630,7 @@ void SpanningTreeUtilities::DoFailOver(Link* x) { if (x->FailOver == x->Name) { - Creator->RemoteMessage(NULL,"FAILOVER: Some muppet configured the failover for server \002%s\002 to point at itself. Not following it!", x->Name.c_str()); + this->ServerInstance->SNO->WriteToSnoMask('l', "FAILOVER: Some muppet configured the failover for server \002%s\002 to point at itself. Not following it!", x->Name.c_str()); return; } Link* TryThisOne = this->FindLink(x->FailOver.c_str()); @@ -641,13 +643,13 @@ void SpanningTreeUtilities::DoFailOver(Link* x) } else { - Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); + this->ServerInstance->SNO->WriteToSnoMask('l', "FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); Creator->ConnectServer(TryThisOne); } } else { - Creator->RemoteMessage(NULL,"FAILOVER: Invalid failover server specified for server \002%s\002, will not follow!", x->Name.c_str()); + this->ServerInstance->SNO->WriteToSnoMask('l', "FAILOVER: Invalid failover server specified for server \002%s\002, will not follow!", x->Name.c_str()); } } }