Move <security:hidesplits> to the spanningtree module.

This commit is contained in:
Peter Powell 2018-10-01 16:41:18 +01:00
parent ff5fdd21c1
commit d7dd8d193c
5 changed files with 7 additions and 6 deletions

View File

@ -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)
*/

View File

@ -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");

View File

@ -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();

View File

@ -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");

View File

@ -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;