summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon <brandon@bremaweb.com>2013-06-22 23:11:10 -0500
committerBrandon <brandon@bremaweb.com>2013-06-22 23:11:10 -0500
commit55e77f35e8c3d1f22ffd39af38dc830002d0da2d (patch)
treefbc531328d3de226faff2fae91e76b3c8aafa69c
parent4b4f5454331b4a61eb901acbe4055aa028e38f22 (diff)
fix exploits
-rw-r--r--landsale.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/landsale.lua b/landsale.lua
index 540453b..4987e86 100644
--- a/landsale.lua
+++ b/landsale.lua
@@ -4,7 +4,7 @@ minetest.register_node("landrush:sale_block",{
tiles={"landrush_sale_block.png"},
groups = {crumbly=2,snappy=2,oddly_breakable_by_hand=2},
drop = "landrush:sale_block",
-
+
after_place_node = function (pos, placer)
local name = placer:get_player_name()
local owner = landrush.get_owner(pos)
@@ -24,7 +24,7 @@ minetest.register_node("landrush:sale_block",{
-- do the sale -- maybe a are you sure formspec?
local name = puncher:get_player_name()
local owner = landrush.get_owner(pos)
- if ( name ~= owner ) then
+ if ( name ~= owner and owner ~= nil ) then
local meta = minetest.get_meta(pos)
local price = meta:get_int("price")
if ( money.get(name) >= price ) then