From 27bccc557116b718ff8bcb4f654441278af4eeed Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 1 Oct 2022 00:53:31 -0700 Subject: [PATCH] don't show gc# in unlicensed sessions --- src/ChatCommands.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 6e2f447d..4ace31a1 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -124,8 +124,12 @@ static void server_command_lobby_info(shared_ptr, shared_ptr static void proxy_command_lobby_info(shared_ptr, ProxyServer::LinkedSession& session, const std::u16string&) { - string msg = string_printf("$C7GC: $C6%" PRId64 "\n$C7Client ID: $C6%zu%s", - session.remote_guild_card_number, + string msg; + if (session.license) { + msg = string_printf("$C7GC: $C6%" PRId64 "\n", + session.remote_guild_card_number); + } + msg += string_printf("$C7Client ID: $C6%zu%s", session.lobby_client_id, (session.leader_client_id == session.lobby_client_id) ? " (L)" : "");