mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Only start Master of config files exist
Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
This commit is contained in:
@@ -45,8 +45,8 @@ int main(int argc, char** argv) {
|
||||
if (!Game::logger) return EXIT_FAILURE;
|
||||
|
||||
//Read our config:
|
||||
Game::config = new dConfig("chatconfig.ini");
|
||||
Game::logger->SetLogToConsole(bool(std::stoi(Game::config->GetValue("log_to_console"))));
|
||||
Game::config = new dConfig((BinaryPathFinder::GetBinaryDir() / "chatconfig.ini").string());
|
||||
Game::logger->SetLogToConsole(Game::config->GetValue("log_to_console") != "0");
|
||||
Game::logger->SetLogDebugStatements(Game::config->GetValue("log_debug_statements") == "1");
|
||||
|
||||
Game::logger->Log("ChatServer", "Starting Chat server...");
|
||||
|
Reference in New Issue
Block a user