summaryrefslogtreecommitdiff
path: root/src/modules/m_chghost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chghost.cpp')
-rw-r--r--src/modules/m_chghost.cpp5
1 files changed, 3 insertions, 2 deletions
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));
}