diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2021-03-21 22:06:04 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2021-03-26 01:47:27 +0100 |
commit | 98021002253fd1646230c889bc0c8ff4dd1a48e8 (patch) | |
tree | cc00067c4874f4ab6f8e078d8431af5e3fb871c8 /src | |
parent | ec76fb87e6c329d008e9d05be7caae10bb46fb1c (diff) | |
download | minetest-98021002253fd1646230c889bc0c8ff4dd1a48e8.tar.gz minetest-98021002253fd1646230c889bc0c8ff4dd1a48e8.tar.bz2 minetest-98021002253fd1646230c889bc0c8ff4dd1a48e8.zip |
anonymize player list
Diffstat (limited to 'src')
-rw-r--r-- | src/serverlist.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; |