| 46 | } |
| 47 | |
| 48 | void LoadServerConfig() |
| 49 | { |
| 50 | server.config = EQ::JsonConfigFile::Load( |
| 51 | fmt::format("{}/login.json", PathManager::Instance()->GetServerPath()) |
| 52 | ); |
| 53 | LogInfo("Config System Init"); |
| 54 | |
| 55 | server.options.RejectDuplicateServers( |
| 56 | server.config.GetVariableBool( |
| 57 | "worldservers", |
| 58 | "reject_duplicate_servers", |
| 59 | false |
| 60 | ) |
| 61 | ); |
| 62 | server.options.SetShowPlayerCount(server.config.GetVariableBool("worldservers", "show_player_count", false)); |
| 63 | server.options.AllowUnregistered( |
| 64 | server.config.GetVariableBool( |
| 65 | "worldservers", |
| 66 | "unregistered_allowed", |
| 67 | true |
| 68 | ) |
| 69 | ); |
| 70 | server.options.SetWorldDevTestServersListBottom( |
| 71 | server.config.GetVariableBool( |
| 72 | "worldservers", |
| 73 | "dev_test_servers_list_bottom", |
| 74 | false |
| 75 | ) |
| 76 | ); |
| 77 | server.options.SetWorldSpecialCharacterStartListBottom( |
| 78 | server.config.GetVariableBool( |
| 79 | "worldservers", |
| 80 | "special_character_start_list_bottom", |
| 81 | false |
| 82 | ) |
| 83 | ); |
| 84 | |
| 85 | server.options.DisplayExpansions( |
| 86 | server.config.GetVariableBool( |
| 87 | "client_configuration", |
| 88 | "display_expansions", |
| 89 | false |
| 90 | ) |
| 91 | ); |
| 92 | server.options.MaxExpansions( |
| 93 | server.config.GetVariableInt( |
| 94 | "client_configuration", |
| 95 | "max_expansions_mask", |
| 96 | 67108863 |
| 97 | ) |
| 98 | ); |
| 99 | |
| 100 | server.options.AutoCreateAccounts(server.config.GetVariableBool("account", "auto_create_accounts", true)); |
| 101 | |
| 102 | if (std::getenv("LSPX")) { |
| 103 | server.options.EQEmuLoginServerAddress( |
| 104 | server.config.GetVariableString( |
| 105 | "general", |
no test coverage detected