From 9bf111453518804ad8d6bf13f954717db1b8d5d3 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 28 Jan 2024 16:09:59 -0800 Subject: [PATCH] fix spectator team whisper logic --- src/ReceiveCommands.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 88bc5fc9..b897c0aa 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -3272,7 +3272,8 @@ static void on_06(shared_ptr c, uint16_t, uint32_t, string& data) { static const string whisper_text = "(whisper)"; for (size_t x = 0; x < l->max_clients; x++) { if (l->clients[x]) { - const string& effective_text = (private_flags & (1 << x)) ? whisper_text : text; + bool should_hide_contents = (!(l->check_flag(Lobby::Flag::IS_SPECTATOR_TEAM))) && (private_flags & (1 << x)); + const string& effective_text = should_hide_contents ? whisper_text : text; try { send_chat_message(l->clients[x], c->license->serial_number, from_name, effective_text, private_flags); } catch (const runtime_error& e) {