Signed by: Gabriel Pérez-Cerezo <gabriel@gpcf.eu> fixed unlimited spending bug
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Tue, 28 Jun 2016 11:26:22 +0000 (13:26 +0200)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Tue, 28 Jun 2016 11:26:22 +0000 (13:26 +0200)
init.lua

index d4fe534..5fc33f4 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -639,7 +639,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
         if fields.cancel then
            return
         end
-        if price > atm.balance[name] and not name == oldowner then
+        if (price > atm.balance[name]) and not (name == oldowner) then
            minetest.chat_send_player(name, "Not enough money on your account. Please recharge on the atm")
            return
         else