aboutsummaryrefslogtreecommitdiffstats
path: root/src/configparser.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-04-30 22:29:38 +0100
committerGravatar Sadie Powell2026-04-30 23:20:14 +0100
commit9bb55626d51f217466bc08104d2f32eb0bf57c02 (patch)
tree44d8c00b97674cd4e35c5a1def208047bf02bcfa /src/configparser.cpp
parentMove CommandLine from ServerConfig to InspIRCd. (diff)
downloadinspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.tar.gz
inspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.tar.bz2
inspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.zip
Switch ascii comparisons over to our own casemap functions.
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r--src/configparser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index c4038856e..7f5086663 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -275,21 +275,21 @@ struct Parser final
mandatory_tag.clear();
}
- if (insp::equalsci(name, "include"))
+ if (insp::ascii_equals(name, "include"))
{
stack.DoInclude(tag, flags);
}
- else if (insp::equalsci(name, "files"))
+ else if (insp::ascii_equals(name, "files"))
{
for (const auto& [key, value] : tag->GetItems())
stack.DoReadFile(key, value, flags, false);
}
- else if (insp::equalsci(name, "execfiles"))
+ else if (insp::ascii_equals(name, "execfiles"))
{
for (const auto& [key, value] : tag->GetItems())
stack.DoReadFile(key, value, flags, true);
}
- else if (insp::equalsci(name, "define"))
+ else if (insp::ascii_equals(name, "define"))
{
const std::string varname = tag->getString("name");
if (varname.empty())
@@ -559,7 +559,7 @@ bool ConfigTag::readString(const std::string& key, std::string& value, bool allo
{
for (const auto& [ikey, ivalue] : items)
{
- if (!insp::equalsci(ikey, key))
+ if (!insp::ascii_equals(ikey, key))
continue;
value = ivalue;
@@ -735,10 +735,10 @@ bool ConfigTag::getBool(const std::string& key, bool def) const
if(!readString(key, result) || result.empty())
return def;
- if (insp::equalsci(result, "yes") || insp::equalsci(result, "true") || insp::equalsci(result, "on"))
+ if (insp::ascii_equals(result, "yes") || insp::ascii_equals(result, "true") || insp::ascii_equals(result, "on"))
return true;
- if (insp::equalsci(result, "no") || insp::equalsci(result, "false") || insp::equalsci(result, "off"))
+ if (insp::ascii_equals(result, "no") || insp::ascii_equals(result, "false") || insp::ascii_equals(result, "off"))
return false;
LogMalformed(key, result, def ? "yes" : "no", "is not a boolean");