Removed Server Announce
This commit is contained in:
parent
90d4af0106
commit
4b25c1418c
@ -19,23 +19,3 @@ minetest.register_chatcommand("heal", {
|
|||||||
minetest.get_player_by_name(name):set_hp(20);
|
minetest.get_player_by_name(name):set_hp(20);
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
message = {}
|
|
||||||
|
|
||||||
minetest.register_chatcommand("a", {
|
|
||||||
params = "<message>",
|
|
||||||
description = "Ask server to announce something in chat, eg: We need to shut down for maintenance.",
|
|
||||||
privs = {server=true},
|
|
||||||
func = function(name, param)
|
|
||||||
message = param
|
|
||||||
if message == "" then
|
|
||||||
minetest.chat_send_player(name, "Message Required")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if message ~= "" then
|
|
||||||
message = string.match(param, "^([^ ]+)$")
|
|
||||||
minetest.chat_send_all("-!- Server Announcement -!-")
|
|
||||||
minetest.chat_send_all("- "..message.." -")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user