From a129233dcd4356814c8c781b4c4dc1951c4ca44c Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 10 Jul 2013 13:05:59 +0100 Subject: Use an example server name if is not defined. --- src/configreader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/configreader.cpp b/src/configreader.cpp index dba23e27f..f6a9bbd4b 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -359,9 +359,10 @@ void ServerConfig::Fill() ConfigTag* security = ConfValue("security"); if (sid.empty()) { - ServerName = ConfValue("server")->getString("name"); - sid = ConfValue("server")->getString("id"); + ServerName = ConfValue("server")->getString("name", "irc.example.com"); ValidHost(ServerName, ""); + + sid = ConfValue("server")->getString("id"); if (!sid.empty() && !InspIRCd::IsSID(sid)) throw CoreException(sid + " is not a valid server ID. A server ID must be 3 characters long, with the first character a digit and the next two characters a digit or letter."); } -- cgit v1.2.3