forked from minetest-mods/irc
Add number of connected players to players
command (#73)
This commit is contained in:
parent
758e9b6361
commit
c088ba4e40
@ -169,8 +169,10 @@ irc.register_bot_command("players", {
|
|||||||
for _, player in pairs(players) do
|
for _, player in pairs(players) do
|
||||||
table.insert(names, player:get_player_name())
|
table.insert(names, player:get_player_name())
|
||||||
end
|
end
|
||||||
return true, "Connected players: "
|
return true, string.format("%d connected player(s): %s",
|
||||||
..table.concat(names, ", ")
|
#players,
|
||||||
|
table.concat(names, ", ")
|
||||||
|
)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user