- throw CoreException("You must restart to change the server name or SID");
- }
- diepass = ConfValue("power")->getString("diepass");
- restartpass = ConfValue("power")->getString("restartpass");
- powerhash = ConfValue("power")->getString("hash");
- PrefixQuit = options->getString("prefixquit");
- SuffixQuit = options->getString("suffixquit");
- FixedQuit = options->getString("fixedquit");
- PrefixPart = options->getString("prefixpart");
- SuffixPart = options->getString("suffixpart");
- FixedPart = options->getString("fixedpart");
- SoftLimit = ConfValue("performance")->getInt("softlimit", ServerInstance->SE->GetMaxFds());
- MaxConn = ConfValue("performance")->getInt("somaxconn", SOMAXCONN);
- MoronBanner = options->getString("moronbanner", "You're banned!");
- ServerDesc = ConfValue("server")->getString("description", "Configure Me");
- Network = ConfValue("server")->getString("network", "Network");
- AdminName = ConfValue("admin")->getString("name", "");
- AdminEmail = ConfValue("admin")->getString("email", "null@example.com");
- AdminNick = ConfValue("admin")->getString("nick", "admin");
- ModPath = ConfValue("path")->getString("moduledir", MOD_PATH);
- NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240);
- dns_timeout = ConfValue("dns")->getInt("timeout", 5);
- DisabledCommands = ConfValue("disabled")->getString("commands", "");
- DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant");
- UserStats = security->getString("userstats");
- CustomVersion = security->getString("customversion", Network + " IRCd");
- HideSplits = security->getBool("hidesplits");
+ throw CoreException("You must restart to change the server id");
+
+ std::string casemapping = options->getString("casemapping");
+ // Ignore this value if CaseMapping is set to something the core doesn't provide (i.e., m_nationalchars).
+ if (!casemapping.empty() && casemapping != CaseMapping && (CaseMapping == "ascii" || CaseMapping == "rfc1459"))
+ throw CoreException("You must restart to change the server casemapping");
+
+ }
+ SoftLimit = ConfValue("performance")->getUInt("softlimit", (SocketEngine::GetMaxFds() > 0 ? SocketEngine::GetMaxFds() : LONG_MAX), 10);
+ CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true);
+ MaxConn = ConfValue("performance")->getUInt("somaxconn", SOMAXCONN);
+ TimeSkipWarn = ConfValue("performance")->getDuration("timeskipwarn", 2, 0, 30);
+ XLineMessage = options->getString("xlinemessage", options->getString("moronbanner", "You're banned!"));
+ ServerDesc = server->getString("description", "Configure Me", 1);
+ Network = server->getString("network", "Network", 1);
+ NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240, 1024, 65534);
+ CustomVersion = security->getString("customversion");