aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_sethost.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/modules/m_sethost.cpp
parentMerge branch 'insp3' into master. (diff)
parentSet the minimum length to 1 for most config items with a default. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_sethost.cpp')
-rw-r--r--src/modules/m_sethost.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 0ab6c3444..a96c3b9fe 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) 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));
}