From 6d0e3d462b07b14b0207650ef77011c05a9ea710 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 17 Nov 2013 12:10:37 +0100 Subject: allow /unshareall to unshare all areas for an offline user (similar to /unsharearea) while not going through an /unshareall with ones own name --- chatcommands.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chatcommands.lua b/chatcommands.lua index d452b63..afa5436 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -193,8 +193,7 @@ minetest.register_chatcommand("unshareall", { description = "unshares all your landclaims with ", privs = {interact=true}, func = function(name, param) - - if minetest.env:get_player_by_name(param) then + if name ~= param then local qdone = 0 for k,v in pairs(claims) do if claims[k].owner == name then @@ -213,7 +212,7 @@ minetest.register_chatcommand("unshareall", { minetest.chat_send_player(name, param.." had noting changed. You may not own any land.") end else - minetest.chat_send_player(name, param.." is not a valid player. Player must be online to unshare.") + minetest.chat_send_player(name, 'Use "/unclaim" to unclaim any of your areas.') end end, }) -- cgit v1.2.3