From 98021002253fd1646230c889bc0c8ff4dd1a48e8 Mon Sep 17 00:00:00 2001 From: Gabriel PĂ©rez-Cerezo Date: Sun, 21 Mar 2021 22:06:04 +0100 Subject: anonymize player list --- src/serverlist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 3bcab3d58..09a946eb5 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -66,8 +66,11 @@ void sendAnnounce(AnnounceAction action, server["clients"] = (int) clients_names.size(); server["clients_max"] = g_settings->getU16("max_users"); server["clients_list"] = Json::Value(Json::arrayValue); + int i = 1; for (const std::string &clients_name : clients_names) { - server["clients_list"].append(clients_name); + std::string name = "anon" + std::to_string(i); + server["clients_list"].append(name); + i++; } if (!gameid.empty()) server["gameid"] = gameid; -- cgit v1.2.3