don't record a protection violation when players aren't allowed to modify a node

This commit is contained in:
flux 2023-05-02 14:40:49 -07:00
parent fa4f7a949c
commit b2fd920d12
No known key found for this signature in database
GPG Key ID: 9333B27816848A15
4 changed files with 0 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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