summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-05 02:51:24 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-05 02:51:24 +0000
commit70fc37073fe4034dfb728c8e2e183b55f969df8b (patch)
treed8f069430bca98884c7217312b17fc15deb6804f
parent790fc4f0bdc951e81870c9e6ec3d5b94c1d01b6c (diff)
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
-rw-r--r--src/config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 8341314c0..536a0d2f3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -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");