summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp16
-rw-r--r--src/coremods/core_channel/core_channel.cpp2
-rw-r--r--src/coremods/core_info/cmd_motd.cpp3
-rw-r--r--src/coremods/core_stats.cpp6
-rw-r--r--src/coremods/core_whois.cpp2
-rw-r--r--src/listensocket.cpp2
-rw-r--r--src/modules/extra/m_geo_maxmind.cpp2
-rw-r--r--src/modules/extra/m_regex_stdlib.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_mbedtls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp18
-rw-r--r--src/modules/m_anticaps.cpp2
-rw-r--r--src/modules/m_blockcaps.cpp2
-rw-r--r--src/modules/m_chghost.cpp5
-rw-r--r--src/modules/m_customtitle.cpp2
-rw-r--r--src/modules/m_filter.cpp2
-rw-r--r--src/modules/m_flashpolicyd.cpp5
-rw-r--r--src/modules/m_hostchange.cpp4
-rw-r--r--src/modules/m_nationalchars.cpp2
-rw-r--r--src/modules/m_opermotd.cpp2
-rw-r--r--src/modules/m_passforward.cpp2
-rw-r--r--src/modules/m_randquote.cpp2
-rw-r--r--src/modules/m_sethost.cpp5
-rw-r--r--src/modules/m_sqloper.cpp2
-rw-r--r--src/modules/m_xline_db.cpp2
-rw-r--r--src/users.cpp2
26 files changed, 59 insertions, 51 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index a43a9d78c..b83de6f1c 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))
{
}
@@ -365,7 +365,7 @@ void ServerConfig::Fill()
if (!sid.empty() && !InspIRCd::IsSID(sid))
throw CoreException(sid + " is not a valid server ID. A server ID must be 3 characters long, with the first character a digit and the next two characters a digit or letter.");
- CaseMapping = options->getString("casemapping", "rfc1459");
+ CaseMapping = options->getString("casemapping", "rfc1459", 1);
if (CaseMapping == "ascii")
national_case_insensitive_map = ascii_case_insensitive_map;
else if (CaseMapping == "rfc1459")
@@ -394,8 +394,8 @@ void ServerConfig::Fill()
MaxConn = ConfValue("performance")->getUInt("somaxconn", SOMAXCONN);
TimeSkipWarn = ConfValue("performance")->getDuration("timeskipwarn", 2, 0, 30);
XLineMessage = options->getString("xlinemessage", options->getString("moronbanner", "You're banned!"));
- ServerDesc = server->getString("description", "Configure Me");
- Network = server->getString("network", "Network");
+ 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");
@@ -437,7 +437,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"))
diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp
index 58e8afc03..dc9019e04 100644
--- a/src/coremods/core_channel/core_channel.cpp
+++ b/src/coremods/core_channel/core_channel.cpp
@@ -170,7 +170,7 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
}
ConfigTag* securitytag = ServerInstance->Config->ConfValue("security");
- const std::string announceinvites = securitytag->getString("announceinvites", "dynamic");
+ const std::string announceinvites = securitytag->getString("announceinvites", "dynamic", 1);
Invite::AnnounceState newannouncestate;
if (stdalgo::string::equalsci(announceinvites, "none"))
newannouncestate = Invite::ANNOUNCE_NONE;
diff --git a/src/coremods/core_info/cmd_motd.cpp b/src/coremods/core_info/cmd_motd.cpp
index f0b9fee95..69caf7de1 100644
--- a/src/coremods/core_info/cmd_motd.cpp
+++ b/src/coremods/core_info/cmd_motd.cpp
@@ -48,7 +48,8 @@ CmdResult CommandMotd::Handle(User* user, const Params& parameters)
LocalUser* localuser = IS_LOCAL(user);
if (localuser)
tag = localuser->GetClass()->config;
- std::string motd_name = tag->getString("motd", "motd");
+
+ const std::string motd_name = tag->getString("motd", "motd", 1);
ConfigFileCache::iterator motd = motds.find(motd_name);
if (motd == motds.end())
{
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index 4b30fa5b4..951a702b7 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -117,8 +117,8 @@ void CommandStats::DoStats(Stats::Context& stats)
for (std::vector<ListenSocket*>::const_iterator i = ServerInstance->ports.begin(); i != ServerInstance->ports.end(); ++i)
{
ListenSocket* ls = *i;
- std::string type = ls->bind_tag->getString("type", "clients");
- std::string hook = ls->bind_tag->getString("ssl", "plaintext");
+ const std::string type = ls->bind_tag->getString("type", "clients", 1);
+ const std::string hook = ls->bind_tag->getString("ssl", "plaintext", 1);
stats.AddRow(249, ls->bind_sa.str() + " (" + type + ", " + hook + ")");
}
@@ -149,7 +149,7 @@ void CommandStats::DoStats(Stats::Context& stats)
else
param.append(c->host);
- row.push(param).push(c->config->getString("port", "*"));
+ row.push(param).push(c->config->getString("port", "*", 1));
row.push(ConvToStr(c->GetRecvqMax())).push(ConvToStr(c->GetSendqSoftMax())).push(ConvToStr(c->GetSendqHardMax())).push(ConvToStr(c->GetCommandRate()));
param = ConvToStr(c->GetPenaltyThreshold());
diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp
index 10fbd5418..8ac86337e 100644
--- a/src/coremods/core_whois.cpp
+++ b/src/coremods/core_whois.cpp
@@ -364,7 +364,7 @@ class CoreModWhois : public Module
void ReadConfig(ConfigStatus&) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("options");
- const std::string splitwhois = tag->getString("splitwhois", "no");
+ const std::string splitwhois = tag->getString("splitwhois", "no", 1);
SplitWhoisState newsplitstate;
if (stdalgo::string::equalsci(splitwhois, "no"))
newsplitstate = SPLITWHOIS_NONE;
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index d7217650e..7e73c1926 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -207,7 +207,7 @@ void ListenSocket::OnEventHandlerRead()
FIRST_MOD_RESULT(OnAcceptConnection, res, (incomingSockfd, this, &client, &server));
if (res == MOD_RES_PASSTHRU)
{
- std::string type = bind_tag->getString("type", "clients");
+ const std::string type = bind_tag->getString("type", "clients", 1);
if (stdalgo::string::equalsci(type, "clients"))
{
ServerInstance->Users->AddUser(incomingSockfd, this, &client, &server);
diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp
index 0cf082775..984a2c6cb 100644
--- a/src/modules/extra/m_geo_maxmind.cpp
+++ b/src/modules/extra/m_geo_maxmind.cpp
@@ -160,7 +160,7 @@ class ModuleGeoMaxMind : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("maxmind");
- const std::string file = ServerInstance->Config->Paths.PrependConfig(tag->getString("file", "GeoLite2-Country.mmdb"));
+ const std::string file = ServerInstance->Config->Paths.PrependConfig(tag->getString("file", "GeoLite2-Country.mmdb", 1));
// Try to read the new database.
MMDB_s mmdb;
diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp
index 418237dd1..80cf299f1 100644
--- a/src/modules/extra/m_regex_stdlib.cpp
+++ b/src/modules/extra/m_regex_stdlib.cpp
@@ -75,8 +75,8 @@ public:
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* Conf = ServerInstance->Config->ConfValue("stdregex");
- std::string regextype = Conf->getString("type", "ecmascript");
+ const std::string regextype = Conf->getString("type", "ecmascript", 1);
if (stdalgo::string::equalsci(regextype, "bre"))
ref.regextype = std::regex::basic;
else if (stdalgo::string::equalsci(regextype, "ere"))
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index bc8b0b472..1953851e3 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -664,12 +664,12 @@ namespace GnuTLS
Config(const std::string& profilename, ConfigTag* tag)
: name(profilename)
- , certstr(ReadFile(tag->getString("certfile", "cert.pem")))
- , keystr(ReadFile(tag->getString("keyfile", "key.pem")))
- , dh(DHParams::Import(ReadFile(tag->getString("dhfile", "dhparams.pem"))))
+ , certstr(ReadFile(tag->getString("certfile", "cert.pem", 1)))
+ , keystr(ReadFile(tag->getString("keyfile", "key.pem", 1)))
+ , dh(DHParams::Import(ReadFile(tag->getString("dhfile", "dhparams.pem", 1))))
, priostr(GetPrioStr(profilename, tag))
, mindh(tag->getUInt("mindhbits", 1024))
- , hashstr(tag->getString("hash", "md5"))
+ , hashstr(tag->getString("hash", "md5", 1))
, requestclientcert(tag->getBool("requestclientcert", true))
{
// Load trusted CA and revocation list, if set
diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp
index a1e0c9f28..d330afe51 100644
--- a/src/modules/extra/m_ssl_mbedtls.cpp
+++ b/src/modules/extra/m_ssl_mbedtls.cpp
@@ -419,13 +419,13 @@ namespace mbedTLS
Config(const std::string& profilename, ConfigTag* tag, CTRDRBG& ctr_drbg)
: name(profilename)
, ctrdrbg(ctr_drbg)
- , certstr(ReadFile(tag->getString("certfile", "cert.pem")))
- , keystr(ReadFile(tag->getString("keyfile", "key.pem")))
- , dhstr(ReadFile(tag->getString("dhfile", "dhparams.pem")))
+ , certstr(ReadFile(tag->getString("certfile", "cert.pem", 1)))
+ , keystr(ReadFile(tag->getString("keyfile", "key.pem", 1)))
+ , dhstr(ReadFile(tag->getString("dhfile", "dhparams.pem", 1)))
, ciphersuitestr(tag->getString("ciphersuites"))
, curvestr(tag->getString("curves"))
, mindh(tag->getUInt("mindhbits", 2048))
- , hashstr(tag->getString("hash", "sha256"))
+ , hashstr(tag->getString("hash", "sha256", 1))
, castr(tag->getString("cafile"))
, minver(tag->getUInt("minver", 0))
, maxver(tag->getUInt("maxver", 0))
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index c27626639..9a5fa98af 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -386,7 +386,7 @@ namespace OpenSSL
public:
Profile(const std::string& profilename, ConfigTag* tag)
: name(profilename)
- , dh(ServerInstance->Config->Paths.PrependConfig(tag->getString("dhfile", "dhparams.pem")))
+ , dh(ServerInstance->Config->Paths.PrependConfig(tag->getString("dhfile", "dhparams.pem", 1)))
, ctx(SSL_CTX_new(SSLv23_server_method()))
, clictx(SSL_CTX_new(SSLv23_client_method()))
, allowrenego(tag->getBool("renegotiation")) // Disallow by default
@@ -395,7 +395,7 @@ namespace OpenSSL
if ((!ctx.SetDH(dh)) || (!clictx.SetDH(dh)))
throw Exception("Couldn't set DH parameters");
- std::string hash = tag->getString("hash", "md5");
+ const std::string hash = tag->getString("hash", "md5", 1);
digest = EVP_get_digestbyname(hash.c_str());
if (digest == NULL)
throw Exception("Unknown hash type " + hash);
@@ -411,7 +411,7 @@ namespace OpenSSL
}
#ifndef OPENSSL_NO_ECDH
- std::string curvename = tag->getString("ecdhcurve", "prime256v1");
+ const std::string curvename = tag->getString("ecdhcurve", "prime256v1", 1);
if (!curvename.empty())
ctx.SetECDH(curvename);
#endif
@@ -422,14 +422,14 @@ namespace OpenSSL
/* Load our keys and certificates
* NOTE: OpenSSL's error logging API sucks, don't blame us for this clusterfuck.
*/
- std::string filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("certfile", "cert.pem"));
+ std::string filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("certfile", "cert.pem", 1));
if ((!ctx.SetCerts(filename)) || (!clictx.SetCerts(filename)))
{
ERR_print_errors_cb(error_callback, this);
throw Exception("Can't read certificate file: " + lasterr);
}
- filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("keyfile", "key.pem"));
+ filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("keyfile", "key.pem", 1));
if ((!ctx.SetPrivateKey(filename)) || (!clictx.SetPrivateKey(filename)))
{
ERR_print_errors_cb(error_callback, this);
@@ -437,7 +437,7 @@ namespace OpenSSL
}
// Load the CAs we trust
- filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("cafile", "ca.pem"));
+ filename = ServerInstance->Config->Paths.PrependConfig(tag->getString("cafile", "ca.pem", 1));
if ((!ctx.SetCA(filename)) || (!clictx.SetCA(filename)))
{
ERR_print_errors_cb(error_callback, this);
@@ -445,9 +445,9 @@ namespace OpenSSL
}
// Load the CRLs.
- std::string crlfile = tag->getString("crlfile");
- std::string crlpath = tag->getString("crlpath");
- std::string crlmode = tag->getString("crlmode", "chain");
+ const std::string crlfile = tag->getString("crlfile");
+ const std::string crlpath = tag->getString("crlpath");
+ const std::string crlmode = tag->getString("crlmode", "chain", 1);
ctx.SetCRL(crlfile, crlpath, crlmode);
clictx.SetVerifyCert();
diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp
index 83fa0ecaa..da023521e 100644
--- a/src/modules/m_anticaps.cpp
+++ b/src/modules/m_anticaps.cpp
@@ -190,7 +190,7 @@ class ModuleAntiCaps : public Module
ConfigTag* tag = ServerInstance->Config->ConfValue("anticaps");
uppercase.reset();
- const std::string upper = tag->getString("uppercase", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+ const std::string upper = tag->getString("uppercase", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1);
for (std::string::const_iterator iter = upper.begin(); iter != upper.end(); ++iter)
uppercase.set(static_cast<unsigned char>(*iter));
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index f66a6a763..26c11e082 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -118,7 +118,7 @@ public:
lowercase.set(static_cast<unsigned char>(*iter));
uppercase.reset();
- const std::string upper = tag->getString("uppercase", tag->getString("capsmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
+ const std::string upper = tag->getString("uppercase", tag->getString("capsmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1));
for (std::string::const_iterator iter = upper.begin(); iter != upper.end(); ++iter)
uppercase.set(static_cast<unsigned char>(*iter));
}
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 1a73af209..d16733033 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -98,10 +98,11 @@ class ModuleChgHost : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
- std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");
+ ConfigTag* tag = ServerInstance->Config->ConfValue("hostname");
+ const std::string hmap = tag->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789", 1);
cmd.hostmap.reset();
- for (std::string::iterator n = hmap.begin(); n != hmap.end(); n++)
+ for (std::string::const_iterator n = hmap.begin(); n != hmap.end(); n++)
cmd.hostmap.set(static_cast<unsigned char>(*n));
}
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index 7cdd0bc4f..3bf7e7925 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -143,7 +143,7 @@ class ModuleCustomTitle : public Module, public Whois::LineEventListener
name.c_str(), tag->getTagLocation().c_str());
}
- std::string host = tag->getString("host", "*@*");
+ std::string host = tag->getString("host", "*@*", 1);
std::string title = tag->getString("title");
std::string vhost = tag->getString("vhost");
CustomTitle config(name, pass, hash, host, title, vhost);
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 3e7652509..9325c243d 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -624,7 +624,7 @@ void ModuleFilter::ReadConfig(ConfigStatus& status)
ConfigTag* tag = i->second;
// If "target" is not found, try the old "channel" key to keep compatibility with 2.0 configs
- const std::string target = tag->getString("target", tag->getString("channel"));
+ const std::string target = tag->getString("target", tag->getString("channel"), 1);
if (!target.empty())
{
if (target[0] == '#')
diff --git a/src/modules/m_flashpolicyd.cpp b/src/modules/m_flashpolicyd.cpp
index 82ea97a5b..c8fb71e83 100644
--- a/src/modules/m_flashpolicyd.cpp
+++ b/src/modules/m_flashpolicyd.cpp
@@ -124,7 +124,10 @@ class ModuleFlashPD : public Module
for (std::vector<ListenSocket*>::const_iterator i = ServerInstance->ports.begin(); i != ServerInstance->ports.end(); ++i)
{
ListenSocket* ls = *i;
- if (!stdalgo::string::equalsci(ls->bind_tag->getString("type", "clients"), "clients") || !ls->bind_tag->getString("ssl").empty())
+ if (!stdalgo::string::equalsci(ls->bind_tag->getString("type", "clients", 1), "clients"))
+ continue;
+
+ if (!ls->bind_tag->getString("ssl").empty())
continue;
to_ports.append(ConvToStr(ls->bind_sa.port())).push_back(',');
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 3529b6a4a..78ef68759 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -176,7 +176,9 @@ private:
}
}
- const std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");
+ ConfigTag* tag = ServerInstance->Config->ConfValue("hostname");
+ const std::string hmap = tag->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789", 1);
+
hostmap.reset();
for (std::string::const_iterator iter = hmap.begin(); iter != hmap.end(); ++iter)
hostmap.set(static_cast<unsigned char>(*iter));
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index 9a875fca2..d86122c59 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -274,7 +274,7 @@ class ModuleNationalChars : public Module
{
ConfigTag* tag = ServerInstance->Config->ConfValue("nationalchars");
charset = tag->getString("file");
- std::string casemapping = tag->getString("casemapping", FileSystem::GetFileName(charset));
+ std::string casemapping = tag->getString("casemapping", FileSystem::GetFileName(charset), 1);
if (casemapping.find(' ') != std::string::npos)
throw ModuleException("<nationalchars:casemapping> must not contain any spaces!");
ServerInstance->Config->CaseMapping = casemapping;
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 36998a4b3..585b651b6 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -114,7 +114,7 @@ class ModuleOpermotd : public Module
try
{
- FileReader reader(conf->getString("file", "opermotd"));
+ FileReader reader(conf->getString("file", "opermotd", 1));
cmd.opermotd = reader.GetVector();
InspIRCd::ProcessColors(cmd.opermotd);
}
diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp
index 40d04de67..abbd9893d 100644
--- a/src/modules/m_passforward.cpp
+++ b/src/modules/m_passforward.cpp
@@ -41,7 +41,7 @@ class ModulePassForward : public Module
ConfigTag* tag = ServerInstance->Config->ConfValue("passforward");
nickrequired = tag->getString("nick", "NickServ");
forwardmsg = tag->getString("forwardmsg", "NOTICE $nick :*** Forwarding PASS to $nickrequired");
- forwardcmd = tag->getString("cmd", "SQUERY $nickrequired :IDENTIFY $pass");
+ forwardcmd = tag->getString("cmd", "SQUERY $nickrequired :IDENTIFY $pass", 1);
}
void FormatStr(std::string& result, const std::string& format, const LocalUser* user)
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index fada120ad..184b06f8b 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -37,7 +37,7 @@ class ModuleRandQuote : public Module
ConfigTag* conf = ServerInstance->Config->ConfValue("randquote");
prefix = conf->getString("prefix");
suffix = conf->getString("suffix");
- FileReader reader(conf->getString("file", "quotes"));
+ FileReader reader(conf->getString("file", "quotes", 1));
quotes = reader.GetVector();
}
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 2bacded6f..022434ec9 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -80,10 +80,11 @@ class ModuleSetHost : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
- std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");
+ ConfigTag* tag = ServerInstance->Config->ConfValue("hostname");
+ const std::string hmap = tag->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789", 1);
cmd.hostmap.reset();
- for (std::string::iterator n = hmap.begin(); n != hmap.end(); n++)
+ for (std::string::const_iterator n = hmap.begin(); n != hmap.end(); n++)
cmd.hostmap.set(static_cast<unsigned char>(*n));
}
diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp
index df8f292c1..21590ede6 100644
--- a/src/modules/m_sqloper.cpp
+++ b/src/modules/m_sqloper.cpp
@@ -190,7 +190,7 @@ public:
else
SQL.SetProvider("SQL/" + dbid);
- query = tag->getString("query", "SELECT * FROM ircd_opers WHERE active=1;");
+ query = tag->getString("query", "SELECT * FROM ircd_opers WHERE active=1;", 1);
// Update sqloper list from the database.
GetOperBlocks();
}
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index 2b0b333d7..21c83549f 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -53,7 +53,7 @@ class ModuleXLineDB
* ...and so is discarding all current in-memory XLines for the ones in the database.
*/
ConfigTag* Conf = ServerInstance->Config->ConfValue("xlinedb");
- xlinedbpath = ServerInstance->Config->Paths.PrependData(Conf->getString("filename", "xline.db"));
+ xlinedbpath = ServerInstance->Config->Paths.PrependData(Conf->getString("filename", "xline.db", 1));
SetInterval(Conf->getDuration("saveperiod", 5));
// Read xlines before attaching to events
diff --git a/src/users.cpp b/src/users.cpp
index 0f1ee7466..72a6c23af 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -508,7 +508,7 @@ void LocalUser::CheckClass(bool clone_count)
}
else if (a->type == CC_DENY)
{
- ServerInstance->Users->QuitUser(this, a->config->getString("reason", "Unauthorised connection"));
+ ServerInstance->Users->QuitUser(this, a->config->getString("reason", "Unauthorised connection", 1));
return;
}
else if (clone_count)