diff options
author | Peter Powell <petpow@saberuk.com> | 2018-10-01 16:41:18 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-10-01 17:26:22 +0100 |
commit | d7dd8d193c2e6176e97ec182d65b6ba1d0800aa5 (patch) | |
tree | 4aa8ae8b467301e548ea7ef34f998f65be4661fd /src/modules | |
parent | ff5fdd21c161f8fec055fa93f7d460e1e83b9658 (diff) |
Move <security:hidesplits> to the spanningtree module.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.h | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index ca7959ea7..65e0a2c4d 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -212,7 +212,7 @@ void TreeServer::SQuitInternal(unsigned int& num_lost_servers) unsigned int TreeServer::QuitUsers(const std::string& reason) { - std::string publicreason = ServerInstance->Config->HideSplits ? "*.net *.split" : reason; + std::string publicreason = Utils->HideSplits ? "*.net *.split" : reason; const user_hash& users = ServerInstance->Users->GetUsers(); unsigned int original_size = users.size(); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 61a6868b3..1224b1cf4 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -241,6 +241,7 @@ void SpanningTreeUtilities::ReadConfiguration() ConfigTag* options = ServerInstance->Config->ConfValue("options"); FlatLinks = security->getBool("flatlinks"); HideULines = security->getBool("hideulines"); + HideSplits = security->getBool("hidesplits"); AnnounceTSChange = options->getBool("announcets"); AllowOptCommon = options->getBool("allowmismatch"); quiet_bursts = ServerInstance->Config->ConfValue("performance")->getBool("quietbursts"); diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 495b09414..e83e1c839 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -57,6 +57,11 @@ class SpanningTreeUtilities : public classbase /** Flatten links and /MAP for non-opers */ bool FlatLinks; + + /** True if we're going to hide netsplits as *.net *.split for non-opers + */ + bool HideSplits; + /** Hide U-Lined servers in /MAP and /LINKS */ bool HideULines; |