add option to change chat command character

This commit is contained in:
Martin Michelsen
2026-01-04 00:32:46 -08:00
parent 4aa206bd4b
commit a469b4355e
6 changed files with 24 additions and 5 deletions
+8
View File
@@ -1114,6 +1114,14 @@ void ServerState::load_config_early() {
}
this->enable_chat_commands = this->config_json->get_bool("EnableChatCommands", true);
try {
const auto& s = this->config_json->get_string("ChatCommandSentinel");
if (s.size() != 1) {
throw std::runtime_error("ChatCommandSentinel must be a string of length 1");
}
this->chat_command_sentinel = s[0];
} catch (const std::out_of_range&) {
}
this->num_backup_character_slots = this->config_json->get_int("BackupCharacterSlots", 16);
this->version_name_colors.reset();