2021-05-29 16:12:33 +02:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
2021-03-05 10:22:52 +01:00
|
|
|
|
|
|
|
minetest.register_chatcommand("list", {
|
|
|
|
description = S("Show who is logged on"),
|
|
|
|
params = "",
|
|
|
|
privs = {},
|
|
|
|
func = function(name)
|
|
|
|
local players = ""
|
|
|
|
for _, player in ipairs(minetest.get_connected_players()) do
|
|
|
|
players = players..player:get_player_name().."\n"
|
|
|
|
end
|
|
|
|
minetest.chat_send_player(name, players)
|
|
|
|
end
|
|
|
|
})
|