X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Futils.cpp;h=b8a634797b8acf691374986caaabf1ead0b48495;hb=66d187fa55b4fdcb38ec987c269c4c1573a441b5;hp=9d4fbf41a3c19c4d2c7555d2fbccc30e4abf9e3a;hpb=599941771e7d174c3e15f65ab2a1d7d9fefbd5f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 9d4fbf41a..b8a634797 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -202,6 +202,7 @@ SpanningTreeUtilities::~SpanningTreeUtilities() } } delete TreeRoot; + ServerInstance->InspSocketCull(); } void SpanningTreeUtilities::AddThisServer(TreeServer* server, TreeServerList &list) @@ -497,8 +498,12 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind) ChallengeResponse = !Conf->ReadFlag("options", "disablehmac", 0); quiet_bursts = Conf->ReadFlag("options", "quietbursts", 0); PingWarnTime = Conf->ReadInteger("options", "pingwarning", 0, true); + PingFreq = Conf->ReadInteger("options", "serverpingfreq", 0, true); - if (PingWarnTime < 0 || PingWarnTime > 59) + if (PingFreq == 0) + PingFreq = 60; + + if (PingWarnTime < 0 || PingWarnTime > PingFreq - 1) PingWarnTime = 0; LinkBlocks.clear(); @@ -616,18 +621,18 @@ void SpanningTreeUtilities::DoFailOver(Link* x) { if (x->FailOver == x->Name) { - 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()); + 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()); return; } Link* TryThisOne = this->FindLink(x->FailOver.c_str()); if (TryThisOne) { - ServerInstance->SNO->WriteToSnoMask('l',"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); + Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); Creator->ConnectServer(TryThisOne); } else { - ServerInstance->SNO->WriteToSnoMask('l',"FAILOVER: Invalid failover server specified for server \002%s\002, will not follow!", x->Name.c_str()); + Creator->RemoteMessage(NULL,"FAILOVER: Invalid failover server specified for server \002%s\002, will not follow!", x->Name.c_str()); } } }