From dbf44e60ff5725e66183bdd22df971ab31684d7c Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 1 Oct 2022 00:54:23 -0700 Subject: [PATCH] prevent $item in lobbies --- src/ChatCommands.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 6ee0fa28..985ab284 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -904,6 +904,11 @@ static void proxy_command_item(shared_ptr, u"$C6This command cannot\nbe used on the proxy\nserver in BB games"); return; } + if (!session.is_in_game) { + send_text_message(session.client_channel, + u"$C6You must be in\na game to use this\ncommand"); + return; + } if (session.lobby_client_id != session.leader_client_id) { send_text_message(session.client_channel, u"$C6You must be the\nleader to use this\ncommand");