From 3e8c5b2685d51cc0bf7d8ac15ac825852336956e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 17 Dec 2025 14:10:10 +0000 Subject: [PATCH] Comment out options that users generally shouldn't change. --- data/anope.example.conf | 2 +- src/protocol.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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;