diff options
author | Brandon <brandon@bremaweb.com> | 2013-12-02 09:20:59 -0600 |
---|---|---|
committer | Brandon <brandon@bremaweb.com> | 2013-12-02 09:20:59 -0600 |
commit | 88b37c0d4fe9779d731c55505497600dcc87d575 (patch) | |
tree | cc98a2b4fae274f720c1aa9f9523cdcd1355205a | |
parent | bf2f311f21a4a7fd24148aa57f415d2ad6d67562 (diff) |
fix playing ban warning playing for all players
-rw-r--r-- | protection.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protection.lua b/protection.lua index 8e1f16f..f55cf18 100644 --- a/protection.lua +++ b/protection.lua @@ -46,6 +46,7 @@ end function landrush.do_autoban(pos,name) -- moved this to it's own function so landrush.protection_violation is a little cleaner, and this could be overwritten as well + if ( landrush.offense[name] == nil ) then landrush.offense[name] = {count=0,lastpos=nil,lasttime=os.time(),bancount=0} end @@ -98,7 +99,7 @@ function landrush.do_autoban(pos,name) if ( landrush.offense[name].count > tonumber(landrush.config:get("banWarning")) ) then minetest.chat_send_player(name, "Stop trying to dig in claimed areas or you will be banned!") minetest.chat_send_player(name, "Use /showarea and /landowner to see the protected area and who owns it.") - minetest.sound_play("landrush_ban_warning", {to_name=name,gain = 10.0}) + minetest.sound_play("landrush_ban_warning", {to_player=name,gain = 10.0}) end landrush.offense[name].lasttime = os.time() |