summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp5
1 files changed, 3 insertions, 2 deletions
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, "<server:name>");
+
+ 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.");
}