add option to disable chat commands on proxy server
This commit is contained in:
@@ -72,7 +72,8 @@ vector<MenuItem> quest_download_menu({
|
||||
|
||||
static const unordered_map<uint32_t, const char16_t*> proxy_options_menu_descriptions({
|
||||
{ProxyOptionsMenuItemID::GO_BACK, u"Return to the\nproxy menu"},
|
||||
{ProxyOptionsMenuItemID::CHAT_FILTER, u"Enable escape\nsequences in chat\nmessages"},
|
||||
{ProxyOptionsMenuItemID::CHAT_COMMANDS, u"Enable chat\ncommands"},
|
||||
{ProxyOptionsMenuItemID::CHAT_FILTER, u"Enable escape\nsequences in\nchat messages"},
|
||||
{ProxyOptionsMenuItemID::INFINITE_HP, u"Enable automatic HP\nrestoration when\nyou are hit by an\nenemy or trap\n\nCannot revive you\nfrom one-hit kills"},
|
||||
{ProxyOptionsMenuItemID::INFINITE_TP, u"Enable automatic TP\nrestoration when\nyou cast any\ntechnique"},
|
||||
{ProxyOptionsMenuItemID::SWITCH_ASSIST, u"Automatically try\nto unlock 2-player\ndoors when you step\non both switches\nsequentially"},
|
||||
@@ -99,6 +100,7 @@ static vector<MenuItem> proxy_options_menu_for_client(
|
||||
ret.emplace_back(item_id, option, u"", 0);
|
||||
};
|
||||
|
||||
add_option(ProxyOptionsMenuItemID::CHAT_COMMANDS, c->options.enable_chat_commands, u"Chat commands");
|
||||
add_option(ProxyOptionsMenuItemID::CHAT_FILTER, c->options.enable_chat_filter, u"Chat filter");
|
||||
if (!(c->flags & Client::Flag::IS_EPISODE_3)) {
|
||||
add_option(ProxyOptionsMenuItemID::INFINITE_HP, c->options.infinite_hp, u"Infinite HP");
|
||||
@@ -1792,6 +1794,9 @@ static void on_10(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
case ProxyOptionsMenuItemID::GO_BACK:
|
||||
send_proxy_destinations_menu(s, c);
|
||||
break;
|
||||
case ProxyOptionsMenuItemID::CHAT_COMMANDS:
|
||||
c->options.enable_chat_commands = !c->options.enable_chat_commands;
|
||||
goto resend_proxy_options_menu;
|
||||
case ProxyOptionsMenuItemID::CHAT_FILTER:
|
||||
c->options.enable_chat_filter = !c->options.enable_chat_filter;
|
||||
goto resend_proxy_options_menu;
|
||||
|
||||
Reference in New Issue
Block a user