Add isPrivate to server info
This commit is contained in:
parent
517e134f82
commit
063c595bb5
@ -36,6 +36,7 @@ namespace server_list
|
|||||||
game::CodPlayMode play_mode;
|
game::CodPlayMode play_mode;
|
||||||
char in_game;
|
char in_game;
|
||||||
game::netadr_s address;
|
game::netadr_s address;
|
||||||
|
bool is_private;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -156,6 +157,11 @@ namespace server_list
|
|||||||
return servers[i].game_type.empty() ? "" : utils::string::va("%i", servers[i].ping);
|
return servers[i].game_type.empty() ? "" : utils::string::va("%i", servers[i].ping);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (column == 5)
|
||||||
|
{
|
||||||
|
return servers[i].is_private ? "1" : "0";
|
||||||
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,6 +368,7 @@ namespace server_list
|
|||||||
server.max_clients = atoi(info.get("sv_maxclients").data());
|
server.max_clients = atoi(info.get("sv_maxclients").data());
|
||||||
server.bots = atoi(info.get("bots").data());
|
server.bots = atoi(info.get("bots").data());
|
||||||
server.ping = std::min(now - start_time, 999);
|
server.ping = std::min(now - start_time, 999);
|
||||||
|
server.is_private = atoi(info.get("isPrivate").data()) == 1;
|
||||||
|
|
||||||
server.in_game = 1;
|
server.in_game = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user