aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-04-09 18:06:50 +0100
committerGravatar Sadie Powell2020-04-09 18:06:50 +0100
commite1ed9b275f465fbc235a23e416ba7626c7cba6cc (patch)
treea0cda4ca3cf14e2731ada5cd6fc890eb90e80731 /src/configreader.cpp
parentMerge branch 'insp3' into master. (diff)
parentSet the minimum length to 1 for most config items with a default. (diff)
downloadinspircd++-e1ed9b275f465fbc235a23e416ba7626c7cba6cc.tar.gz
inspircd++-e1ed9b275f465fbc235a23e416ba7626c7cba6cc.tar.bz2
inspircd++-e1ed9b275f465fbc235a23e416ba7626c7cba6cc.zip
Merge branch 'insp3' into master.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index b9bca0443..dd7b4277f 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -53,10 +53,10 @@ ServerLimits::ServerLimits(ConfigTag* tag)
}
ServerConfig::ServerPaths::ServerPaths(ConfigTag* tag)
- : Config(tag->getString("configdir", INSPIRCD_CONFIG_PATH))
- , Data(tag->getString("datadir", INSPIRCD_DATA_PATH))
- , Log(tag->getString("logdir", INSPIRCD_LOG_PATH))
- , Module(tag->getString("moduledir", INSPIRCD_MODULE_PATH))
+ : Config(tag->getString("configdir", INSPIRCD_CONFIG_PATH, 1))
+ , Data(tag->getString("datadir", INSPIRCD_DATA_PATH, 1))
+ , Log(tag->getString("logdir", INSPIRCD_LOG_PATH, 1))
+ , Module(tag->getString("moduledir", INSPIRCD_MODULE_PATH, 1))
{
}
@@ -378,9 +378,9 @@ void ServerConfig::Fill()
CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true);
MaxConn = ConfValue("performance")->getUInt("somaxconn", SOMAXCONN);
TimeSkipWarn = ConfValue("performance")->getDuration("timeskipwarn", 2, 0, 30);
- XLineMessage = options->getString("xlinemessage", "You're banned!");
- ServerDesc = server->getString("description", "Configure Me");
- Network = server->getString("network", "Network");
+ XLineMessage = options->getString("xlinemessage", "You're banned!", 1);
+ ServerDesc = server->getString("description", "Configure Me", 1);
+ Network = server->getString("network", "Network", 1);
NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240, 1024, 65534);
CustomVersion = security->getString("customversion");
HideBans = security->getBool("hidebans");
@@ -419,7 +419,7 @@ void ServerConfig::Fill()
ReadXLine(this, "badhost", "host", ServerInstance->XLines->GetFactory("K"));
ReadXLine(this, "exception", "host", ServerInstance->XLines->GetFactory("E"));
- const std::string restrictbannedusers = options->getString("restrictbannedusers", "yes");
+ const std::string restrictbannedusers = options->getString("restrictbannedusers", "yes", 1);
if (stdalgo::string::equalsci(restrictbannedusers, "no"))
RestrictBannedUsers = ServerConfig::BUT_NORMAL;
else if (stdalgo::string::equalsci(restrictbannedusers, "silent"))