summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-10-01 16:41:18 +0100
committerPeter Powell <petpow@saberuk.com>2018-10-01 17:26:22 +0100
commitd7dd8d193c2e6176e97ec182d65b6ba1d0800aa5 (patch)
tree4aa8ae8b467301e548ea7ef34f998f65be4661fd
parentff5fdd21c161f8fec055fa93f7d460e1e83b9658 (diff)
Move <security:hidesplits> to the spanningtree module.
-rw-r--r--include/configreader.h4
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp2
-rw-r--r--src/modules/m_spanningtree/utils.cpp1
-rw-r--r--src/modules/m_spanningtree/utils.h5
5 files changed, 7 insertions, 6 deletions
diff --git a/include/configreader.h b/include/configreader.h
index be7d8c7e0..2a1f07283 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -376,10 +376,6 @@ class CoreExport ServerConfig
*/
unsigned int MaxTargets;
- /** True if we're going to hide netsplits as *.net *.split for non-opers
- */
- bool HideSplits;
-
/** True if we're going to hide ban reasons for non-opers (e.g. G-Lines,
* K-Lines, Z-Lines)
*/
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 5399baa17..661e81a6a 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -409,7 +409,6 @@ void ServerConfig::Fill()
DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant");
UserStats = security->getString("userstats");
CustomVersion = security->getString("customversion");
- HideSplits = security->getBool("hidesplits");
HideBans = security->getBool("hidebans");
HideServer = security->getString("hideserver", security->getString("hidewhois"));
SyntaxHints = options->getBool("syntaxhints");
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;