forked from mtcontrib/arrow_signs
check for protection before allowing to write on the sign
This commit is contained in:
parent
e2938bf17e
commit
0f7badedd9
4
init.lua
4
init.lua
@ -110,6 +110,10 @@ arrow_signs.savetext = function(pos, formname, fields, sender)
|
|||||||
minetest.chat_send_player(sender:get_player_name(), "error: you don't have permission to edit the sign. you need the interact priv")
|
minetest.chat_send_player(sender:get_player_name(), "error: you don't have permission to edit the sign. you need the interact priv")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if minetest.is_protected(pos, sender:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(pos, sender:get_player_name())
|
||||||
|
return
|
||||||
|
end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or ""
|
fields.text = fields.text or ""
|
||||||
minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
|
minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
|
Loading…
Reference in New Issue
Block a user