admin.lua 646 B

1234567891011121314151617181920212223242526272829303132333435
  1. local S = protector.intllib
  2. protector.removal_names = ""
  3. minetest.register_chatcommand("delprot", {
  4. params = "",
  5. description = S("Remove Protectors near players with names provided (separate names with spaces)"),
  6. privs = {server = true},
  7. func = function(name, param)
  8. if not param or param == "" then
  9. minetest.chat_send_player(name,
  10. "# Server: " .. S("Protector Names to remove: %1",
  11. protector.removal_names))
  12. return
  13. end
  14. if param == "-" then
  15. minetest.chat_send_player(name,
  16. "# Server: " .. S("Name List Reset."))
  17. protector.removal_names = ""
  18. return
  19. end
  20. protector.removal_names = param
  21. end,
  22. })