prevent $item in lobbies

This commit is contained in:
Martin Michelsen
2022-10-01 00:54:23 -07:00
parent a8f888b829
commit dbf44e60ff
+5
View File
@@ -904,6 +904,11 @@ static void proxy_command_item(shared_ptr<ServerState>,
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");