diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-14 16:53:03 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-16 15:07:06 +0100 |
commit | 7ef2f87e39bd22c7914caf7f2afbb1a3bf8fbd43 (patch) | |
tree | 29c9efd1c7f1f2e3c9e8d058068c28d5b66c40e0 /src/modules/m_spanningtree | |
parent | dec17a2e32573a32751c975b5b55217442cd3185 (diff) |
Remove the default value in ConfigTag::get{Duration,Float,Int}.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 0a96ecfcd..d6f74cc69 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -229,13 +229,10 @@ void SpanningTreeUtilities::ReadConfiguration() AnnounceTSChange = options->getBool("announcets"); AllowOptCommon = options->getBool("allowmismatch"); quiet_bursts = ServerInstance->Config->ConfValue("performance")->getBool("quietbursts"); - PingWarnTime = options->getDuration("pingwarning"); - PingFreq = options->getDuration("serverpingfreq"); + PingWarnTime = options->getDuration("pingwarning", 15); + PingFreq = options->getDuration("serverpingfreq", 60, 1); - if (PingFreq == 0) - PingFreq = 60; - - if (PingWarnTime > PingFreq - 1) + if (PingWarnTime >= PingFreq) PingWarnTime = 0; AutoconnectBlocks.clear(); @@ -253,7 +250,7 @@ void SpanningTreeUtilities::ReadConfiguration() L->AllowMasks.push_back(s); L->IPAddr = tag->getString("ipaddr"); - L->Port = tag->getInt("port"); + L->Port = tag->getInt("port", 0); L->SendPass = tag->getString("sendpass", tag->getString("password")); L->RecvPass = tag->getString("recvpass", tag->getString("password")); L->Fingerprint = tag->getString("fingerprint"); |