Don't record a protection violation when players aren't allowed to modify a node (#78)

This commit is contained in:
fluxionary 2023-05-10 12:40:38 -07:00 committed by GitHub
parent fa4f7a949c
commit 722ff851dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name() local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)
return return
end end
if fields.channel ~= nil then if fields.channel ~= nil then

View File

@ -310,7 +310,6 @@ minetest.register_node("digilines:lcd", {
on_receive_fields = function(pos, _, fields, sender) on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name() local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)
return return
end end
if (fields.channel) then if (fields.channel) then

View File

@ -55,7 +55,6 @@ minetest.register_node("digilines:lightsensor", {
on_receive_fields = function(pos, _, fields, sender) on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name() local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)
return return
end end
if (fields.channel) then if (fields.channel) then

View File

@ -51,7 +51,6 @@ minetest.register_node("digilines:rtc", {
on_receive_fields = function(pos, _, fields, sender) on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name() local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
minetest.record_protection_violation(pos, name)
return return
end end
if (fields.channel) then if (fields.channel) then