1
0
mirror of https://github.com/minetest-mods/irc.git synced 2025-06-30 23:20:29 +02:00

Add amount of connected players to players command

This commit is contained in:
s20
2023-10-25 01:46:10 +05:30
committed by GitHub
parent 758e9b6361
commit ae917df471

View File

@ -169,8 +169,10 @@ irc.register_bot_command("players", {
for _, player in pairs(players) do
table.insert(names, player:get_player_name())
end
return true, "Connected players: "
..table.concat(names, ", ")
return true, string.format("%d connected player(s): %s",
#players,
table.concat(names, ", "),
)
end
})