From d1161dd8e4cdc3363be570f2ba9b18869bb7833f Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Tue, 14 Nov 2023 22:25:03 -0800 Subject: [PATCH] fix cheat mode check on proxy --- src/ChatCommands.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 1679e962..17431b46 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -83,7 +83,7 @@ static void check_cheats_allowed(shared_ptr s) { } static void check_proxy_cheats_allowed(shared_ptr s) { - if (s->cheat_mode_behavior != ServerState::BehaviorSwitch::OFF) { + if (s->cheat_mode_behavior == ServerState::BehaviorSwitch::OFF) { throw precondition_failed("$C6Cheats are disabled\non this proxy."); } } @@ -824,7 +824,7 @@ static void server_command_edit(shared_ptr c, const std::string& args) { check_version(c, GameVersion::BB); if (s->cheat_mode_behavior == ServerState::BehaviorSwitch::OFF) { - send_text_message(l, "$C6Cheats are disabled on\nthis server"); + send_text_message(l, "$C6Cheats are disabled\non this server"); return; }