mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
fix last command
This commit is contained in:
parent
d71e296602
commit
b1ab79b857
2 changed files with 16 additions and 19 deletions
|
@ -9,23 +9,6 @@ dofile(modpath.."/setblock.lua")
|
|||
dofile(modpath.."/seed.lua")
|
||||
dofile(modpath.."/summon.lua")
|
||||
dofile(modpath.."/say.lua")
|
||||
dofile(modpath.."/list.lua")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
|
||||
|
||||
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
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
14
mods/MISC/mcl_commands/list.lua
Normal file
14
mods/MISC/mcl_commands/list.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
local S = minetest.get_translator("mcl_commands")
|
||||
|
||||
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
|
||||
})
|
Loading…
Reference in a new issue