diff --git a/data/anope.example.conf b/data/anope.example.conf index fd393c3f2..427ca2cdc 100644 --- a/data/anope.example.conf +++ b/data/anope.example.conf @@ -328,7 +328,7 @@ networkinfo * * It is recommended you DON'T change this. */ - vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/" + #vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/" /* * If enabled, allows vhosts to not contain dots (.). diff --git a/src/protocol.cpp b/src/protocol.cpp index 398e1c8b5..13d0ec4c2 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -353,8 +353,9 @@ bool IRCDProto::IsHostValid(const Anope::string &host) if (host.empty() || host.length() > IRCD->MaxHost) return false; - const Anope::string &vhostdisablebe = Config->GetBlock("networkinfo").Get("disallow_start_or_end"), - vhostchars = Config->GetBlock("networkinfo").Get("vhost_chars"); + const auto &block = Config->GetBlock("networkinfo"); + const auto &vhostdisablebe = block.Get("disallow_start_or_end", ".-/"); + const auto &vhostchars = block.Get("vhost_chars", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/"); if (vhostdisablebe.find_first_of(host[0]) != Anope::string::npos) return false;