From 166a47ac68ab571ca1aacaaf8c0edfff26f8d59e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 28 Feb 2023 16:32:27 +0000 Subject: Remove GetSID, rename sid to ServerId. --- src/configreader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 79be8145e..d500a0fbd 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -294,20 +294,20 @@ void ServerConfig::Fill() { // Read the config. const auto& server = ConfValue("server"); - if (sid.empty()) + if (ServerId.empty()) { ServerName = server->getString("name", GetServerHost(), InspIRCd::IsFQDN); - sid = 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."); + ServerId = server->getString("id"); + if (!ServerId.empty() && !InspIRCd::IsSID(ServerId)) + throw CoreException(ServerId + " 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."); } else { if (server->getString("name", ServerName, 1) != ServerName) throw CoreException("You must restart to change the server name!"); - if (server->getString("id", sid, 1) != sid) + if (server->getString("id", ServerId, 1) != ServerId) throw CoreException("You must restart to change the server id!"); } ServerDesc = server->getString("description", ServerName, 1); @@ -381,8 +381,8 @@ void ServerConfig::Apply(ServerConfig* old, const std::string& useruid) * These values can only be set on boot. Keep their old values. Do it before we send messages so we actually have a servername. */ this->CaseMapping = old->CaseMapping; + this->ServerId = old->ServerId; this->ServerName = old->ServerName; - this->sid = old->sid; this->cmdline = old->cmdline; } -- cgit v1.3.1-10-gc9f91