aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_hostchange.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-04-09 15:18:04 +0100
committerGravatar Sadie Powell2020-04-09 15:18:04 +0100
commitbb39d78be61e45555cdd87985e26ea07b725fabf (patch)
tree157dc8144dca9d65eec162773fe3f845e6a5582f /src/modules/m_hostchange.cpp
parentAllow <passforward:forwardmsg> to be optional. (diff)
Set the minimum length to 1 for most config items with a default.
Diffstat (limited to 'src/modules/m_hostchange.cpp')
-rw-r--r--src/modules/m_hostchange.cpp4
1 files changed, 3 insertions, 1 deletions
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));