From b43d73c0814640098b5b3da3b5d61cab686b8f83 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Sat, 25 Jun 2022 20:20:48 +0200 Subject: [PATCH] Add isPrivate to server info --- src/client/component/server_list.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client/component/server_list.cpp b/src/client/component/server_list.cpp index 3c9ce6c7..f5059e35 100644 --- a/src/client/component/server_list.cpp +++ b/src/client/component/server_list.cpp @@ -36,6 +36,7 @@ namespace server_list game::CodPlayMode play_mode; char in_game; game::netadr_s address; + bool is_private; }; struct @@ -156,6 +157,11 @@ namespace server_list return servers[i].game_type.empty() ? "" : utils::string::va("%i", servers[i].ping); } + if (column == 5) + { + return servers[i].is_private ? "1" : "0"; + } + return ""; } @@ -362,6 +368,7 @@ namespace server_list server.max_clients = atoi(info.get("sv_maxclients").data()); server.bots = atoi(info.get("bots").data()); server.ping = std::min(now - start_time, 999); + server.is_private = atoi(info.get("isPrivate").data()) == 1; server.in_game = 1;