summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim <idn.inbox@yahoo.com>2013-11-17 12:10:37 +0100
committerTim <idn.inbox@yahoo.com>2013-11-17 12:10:37 +0100
commit6d0e3d462b07b14b0207650ef77011c05a9ea710 (patch)
treeb89ddbf1a9c070886ae56290116d4d47ab9da336
parenta938a10c6648ef1c81acafcb325770f75ecdee4b (diff)
allow /unshareall to unshare all areas for an offline user (similar to /unsharearea) while not going through an /unshareall with ones own name
-rw-r--r--chatcommands.lua5
1 files 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 <name>",
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,
})