Skip to content
Permalink
Browse files

Add protection support to signs

  • Loading branch information
ShadowNinja committed Dec 22, 2013
1 parent 5dcc5cb commit 8eff7ba0cd5c799a67dda6bd39b43bb1bbf94cc6
Showing with 4 additions and 0 deletions.
  1. +4 −0 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..

0 comments on commit 8eff7ba

Please sign in to comment.
You can’t perform that action at this time.