From 2f208687d7f56af0056a9b5bb1d24360d1e619df Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 23 Aug 2013 21:31:41 -0500 Subject: add userunclaim command to unclaim all areas owned by a particular user --- chatcommands.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'chatcommands.lua') diff --git a/chatcommands.lua b/chatcommands.lua index d0df825..d452b63 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -15,6 +15,23 @@ minetest.register_chatcommand("landowner", { end, }) +minetest.register_chatcommand("userunclaim", { + params = "player", + privs = {landrush=true}, + description = "Unclaims all of a players areas", + func = function(name, param) + qdone = 0 + for k,v in pairs(claims) do + if claims[k].owner == param then + claims[k] = nil + qdone = qdone + 1 + end + end + landrush.save_claims() + minetest.chat_send_player(name,tostring(qdone).." claims unclaims for "..param) + end +}) + minetest.register_chatcommand("unclaim", { params = "", description = "unclaims the current map chunk", -- cgit v1.2.3