summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon <brandon@bremaweb.com>2013-08-23 21:31:41 -0500
committerBrandon <brandon@bremaweb.com>2013-08-23 21:31:41 -0500
commit2f208687d7f56af0056a9b5bb1d24360d1e619df (patch)
tree38cbfb20a8a41a2e464e7035fd2787a94c4036a4
parenta961e4305b02eea11f01e3acf068a42db57018c5 (diff)
add userunclaim command to unclaim all areas owned by a particular user
-rw-r--r--chatcommands.lua17
1 files changed, 17 insertions, 0 deletions
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",