mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-14 15:11:05 +01:00
18 lines
485 B
Lua
18 lines
485 B
Lua
|
local S = minetest.get_translator("mcl_commands")
|
||
|
|
||
|
minetest.register_privilege("announce", {
|
||
|
description = S("Can use /say"),
|
||
|
give_to_singleplayer = false,
|
||
|
})
|
||
|
minetest.register_chatcommand("say", {
|
||
|
params = S("<message>"),
|
||
|
description = S("Send a message to every player"),
|
||
|
privs = {announce=true},
|
||
|
func = function(name, param)
|
||
|
if not param then
|
||
|
return false, S("Invalid usage, see /help say.")
|
||
|
end
|
||
|
minetest.chat_send_all(("["..name.."] "..param))
|
||
|
return true
|
||
|
end,
|
||
|
})
|