From: ShadowNinja Date: Wed, 11 Dec 2013 18:13:11 +0000 (-0500) Subject: Add protection support to signs X-Git-Tag: 0.4.9~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F229%2Fhead;p=oweals%2Fminetest_game.git Add protection support to signs --- diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 3dee2257..34b873e5 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -650,6 +650,10 @@ minetest.register_node("default:sign_wall", { end, on_receive_fields = function(pos, formname, fields, sender) --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) fields.text = fields.text or "" minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..