init.lua 433 B

12345678910111213141516171819
  1. echo = echo or {}
  2. echo.modpath = minetest.get_modpath("echo")
  3. minetest.register_privilege("echo", "Allows the player to send server chat messages.")
  4. minetest.register_chatcommand("echo", {
  5. params = "<message>",
  6. description = "Send a message to all players as if it came from the server itself.",
  7. privs = {shout=true, echo=true},
  8. func = function(name, param)
  9. minetest.chat_send_all("# Server: " .. param)
  10. end,
  11. })