mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Optionally hide player names on the serverlist (#14820)
This commit adds a setting to anonymize player names when sending data to the server list.
This commit is contained in:
parent
cfa9c83d33
commit
f04cdc00a6
3 changed files with 8 additions and 3 deletions
|
@ -65,9 +65,10 @@ void sendAnnounce(AnnounceAction action,
|
|||
server["game_time"] = game_time;
|
||||
server["clients"] = (int) clients_names.size();
|
||||
server["clients_max"] = g_settings->getU16("max_users");
|
||||
server["clients_list"] = Json::Value(Json::arrayValue);
|
||||
for (const std::string &clients_name : clients_names) {
|
||||
server["clients_list"].append(clients_name);
|
||||
if (g_settings->getBool("server_announce_send_players")) {
|
||||
server["clients_list"] = Json::Value(Json::arrayValue);
|
||||
for (const std::string &clients_name : clients_names)
|
||||
server["clients_list"].append(clients_name);
|
||||
}
|
||||
if (!gameid.empty())
|
||||
server["gameid"] = gameid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue