mirror of
https://github.com/anope/anope.git
synced 2026-07-01 13:46:38 +02:00
Allow localhost as a valid hostname in ValidateHostname.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1423 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -442,6 +442,7 @@ void ServerConfig::ValidateIP(const char *p, const std::string &tag, const std::
|
||||
|
||||
void ServerConfig::ValidateHostname(const char *p, const std::string &tag, const std::string &val)
|
||||
{
|
||||
if (!strcasecmp(p, "localhost")) return;
|
||||
int num_dots = 0;
|
||||
if (*p) {
|
||||
if (*p == '.') throw ConfigException(static_cast<std::string>("The value of <") + tag + ":" + val + "> is not a valid hostname");
|
||||
|
||||
Reference in New Issue
Block a user