From b2fd920d12c47a07912532d29afdc3c5a1856648 Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Tue, 2 May 2023 14:40:49 -0700 Subject: [PATCH] don't record a protection violation when players aren't allowed to modify a node --- inventory.lua | 1 - lcd.lua | 1 - lightsensor.lua | 1 - rtc.lua | 1 - 4 files changed, 4 deletions(-) diff --git a/inventory.lua b/inventory.lua index 3fa975c..9fc4542 100644 --- a/inventory.lua +++ b/inventory.lua @@ -185,7 +185,6 @@ minetest.register_node("digilines:chest", { on_receive_fields = function(pos, _, fields, sender) local name = sender:get_player_name() if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) return end if fields.channel ~= nil then diff --git a/lcd.lua b/lcd.lua index f6dac22..1bad0c5 100644 --- a/lcd.lua +++ b/lcd.lua @@ -310,7 +310,6 @@ minetest.register_node("digilines:lcd", { on_receive_fields = function(pos, _, fields, sender) local name = sender:get_player_name() if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) return end if (fields.channel) then diff --git a/lightsensor.lua b/lightsensor.lua index 41fa6e0..5f11e13 100644 --- a/lightsensor.lua +++ b/lightsensor.lua @@ -55,7 +55,6 @@ minetest.register_node("digilines:lightsensor", { on_receive_fields = function(pos, _, fields, sender) local name = sender:get_player_name() if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) return end if (fields.channel) then diff --git a/rtc.lua b/rtc.lua index 3414ed6..dac60e8 100644 --- a/rtc.lua +++ b/rtc.lua @@ -51,7 +51,6 @@ minetest.register_node("digilines:rtc", { on_receive_fields = function(pos, _, fields, sender) local name = sender:get_player_name() if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) return end if (fields.channel) then