1
0
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:
Naram Qashat cyberbotx@cyberbotx.com
2008-10-05 02:51:24 +00:00
parent 790fc4f0bd
commit 70fc37073f
+1
View File
@@ -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");