aboutsummaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-04-16 12:15:07 +0100
committerGravatar Sadie Powell2025-04-16 12:15:07 +0100
commitf6781614b0caf32e81ba04140ad5b63b85a5bceb (patch)
treeeb08476c438cf759f00532a77799bde615c425f9 /src/configreader.cpp
parentAdd <security:banrealmask>. (diff)
Move customversion from <security> to <options>.
This does not relate to security so it should not be in the <security> tag.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 496108254..f861f35ba 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -367,9 +367,16 @@ void ServerConfig::Fill()
ServerDesc = server->getString("description", ServerName, 1);
Network = server->getString("network", ServerName, 1);
+ // Read the <security> config.
+ const auto& security = ConfValue("security");
+ BanRealMask = security->getBool("banrealmask", true);
+ HideServer = security->getString("hideserver", {}, InspIRCd::IsFQDN);
+ MaxTargets = security->getNum<size_t>("maxtargets", 5, 1, 50);
+ XLineQuitPublic = security->getString("publicxlinequit");
// Read the <options> config.
const auto& options = ConfValue("options");
+ CustomVersion = options->getString("customversion", security->getString("customversion"));
DefaultModes = options->getString("defaultmodes", "not");
MaskInList = options->getBool("maskinlist");
MaskInTopic = options->getBool("maskintopic");
@@ -395,14 +402,6 @@ void ServerConfig::Fill()
SoftLimit = performance->getNum<size_t>("softlimit", (SocketEngine::GetMaxFds() > 0 ? SocketEngine::GetMaxFds() : SIZE_MAX), 10);
TimeSkipWarn = performance->getDuration("timeskipwarn", 2, 0, 30);
- // Read the <security> config.
- const auto& security = ConfValue("security");
- BanRealMask = security->getBool("banrealmask", true);
- CustomVersion = security->getString("customversion");
- HideServer = security->getString("hideserver", {}, InspIRCd::IsFQDN);
- MaxTargets = security->getNum<size_t>("maxtargets", 5, 1, 50);
- XLineQuitPublic = security->getString("publicxlinequit");
-
// Read the <cidr> config.
const auto& cidr = ConfValue("cidr");
IPv4Range = cidr->getNum<unsigned char>("ipv4clone", 32, 1, 32);