forked from minetest/minetest_game
Add protection support to signs
This commit is contained in:
parent
5dcc5cb305
commit
8eff7ba0cd
@ -650,6 +650,10 @@ minetest.register_node("default:sign_wall", {
|
|||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||||
|
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