mirror of
https://github.com/technix/ham_radio.git
synced 2025-01-22 12:01:27 +01:00
fix protection
This commit is contained in:
parent
5ece6f8383
commit
4fb166ebe4
@ -34,9 +34,13 @@ minetest.register_node("ham_radio:transmitter", {
|
|||||||
meta:set_string("infotext", '')
|
meta:set_string("infotext", '')
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
if not minetest.is_player(sender) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (
|
if (
|
||||||
fields.quit ~= "true"
|
fields.quit ~= "true"
|
||||||
or minetest.is_protected(pos, name)
|
or minetest.is_protected(pos, sender:get_player_name())
|
||||||
or not ham_radio.validate_frequency(fields.frequency)
|
or not ham_radio.validate_frequency(fields.frequency)
|
||||||
) then
|
) then
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user