Index: binaries/data/mods/public/gui/lobby/lobby.js =================================================================== --- binaries/data/mods/public/gui/lobby/lobby.js +++ binaries/data/mods/public/gui/lobby/lobby.js @@ -309,6 +309,25 @@ return false; } }, + "list": { + "description": translate("List users."), + "handler": args => { + let users = Engine.GetPlayerList().map(player => (player.role == "moderator" ? g_ModeratorPrefix : "") + player.name); + addChatMessage({ + "isSpecial": true, + "text": "/special " + sprintf( + translate("%(user)s (%(number)s): "), { + "number": users.length, + "user": translatePlural("User", "Users", users.length) + }) + users.sort((a,b) => { + if (a.toLowerCase() < b.toLowerCase()) return -1; + if (a.toLowerCase() > b.toLowerCase()) return +1; + return 0; + }).map(player => colorPlayerName(player)).join(", ") + }); + return false; + } + }, "kick": { "description": translate("Kick a specified user from the lobby. Usage: /kick nick reason"), "handler": args => { @@ -1445,6 +1464,7 @@ */ function colorPlayerName(playername, rating) { + warn(playername) return coloredText( (rating ? sprintf( translate("%(nick)s (%(rating)s)"), {