add name color for IS_CLIENT_CUSTOMIZATION flag

This commit is contained in:
Martin Michelsen
2024-06-15 09:56:04 -07:00
parent 2608d5d601
commit de45f49b78
6 changed files with 127 additions and 53 deletions
+5
View File
@@ -951,6 +951,7 @@ void ServerState::load_config_early() {
this->enable_chat_commands = this->config_json->get_bool("EnableChatCommands", true);
this->version_name_colors.reset();
this->client_customization_name_color = 0;
try {
const auto& colors_json = this->config_json->get_list("VersionNameColors");
if (colors_json.size() != NUM_NON_PATCH_VERSIONS) {
@@ -963,6 +964,10 @@ void ServerState::load_config_early() {
this->version_name_colors = std::move(new_colors);
} catch (const out_of_range&) {
}
try {
this->client_customization_name_color = this->config_json->get_int("ClientCustomizationNameColor");
} catch (const out_of_range&) {
}
for (auto& order : this->public_lobby_search_orders) {
order.clear();