diff options
author | Brandon <brandon@bremaweb.com> | 2014-02-22 14:30:33 -0600 |
---|---|---|
committer | Brandon <brandon@bremaweb.com> | 2014-02-22 14:30:33 -0600 |
commit | 38f06a8df0a8accefedbd1b10e5a22f9ae2b13a2 (patch) | |
tree | f62b40efbbed2cb4b01d1edb59408c14268b3ac5 /protection.lua | |
parent | cd75c51451cc99cc969bb02159076dc3ab9ba69b (diff) |
add time options for who to ban and damage
Diffstat (limited to 'protection.lua')
-rw-r--r-- | protection.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protection.lua b/protection.lua index c5b8f9f..7fbb3bf 100644 --- a/protection.lua +++ b/protection.lua @@ -126,10 +126,14 @@ function landrush.protection_violation(pos,name) end minetest.chat_send_player(name, "Area owned by "..tostring(owner).." stop trying to dig here!") - player:set_hp( player:get_hp() - landrush.config:get("offenseDamage") ) + if ( tonumber(landrush.config:get("noDamageTime")) > landrush.get_timeonline(name) ) then + player:set_hp( player:get_hp() - landrush.config:get("offenseDamage") ) + end if ( landrush.config:get_bool("autoBan") == true ) then - landrush.do_autoban(pos,name) + if ( tonumber(landrush.config:get("noBanTime")) > landrush.get_timeonline(name) ) then + landrush.do_autoban(pos,name) + end end end |