From 414ef0d825fb5690f36b0fa5e81e36a4b28f5ff0 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 8 Dec 2023 23:33:53 -0800 Subject: [PATCH] don't send card search results if searcher is blocked --- src/ReceiveCommands.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 27f54b60..d511d86d 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -3549,9 +3549,11 @@ static void on_40(shared_ptr c, uint16_t, uint32_t, string& data) { try { auto s = c->require_server_state(); auto result = s->find_client(nullptr, cmd.target_guild_card_number); - auto result_lobby = result->lobby.lock(); - if (result_lobby) { - send_card_search_result(c, result, result_lobby); + if (!result->blocked_senders.count(c->license->serial_number)) { + auto result_lobby = result->lobby.lock(); + if (result_lobby) { + send_card_search_result(c, result, result_lobby); + } } } catch (const out_of_range&) { }