projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dcc5cb
)
Add protection support to signs
229/head
author
ShadowNinja
<noreply@gmail.com>
Wed, 11 Dec 2013 18:13:11 +0000
(13:13 -0500)
committer
ShadowNinja
<noreply@gmail.com>
Sun, 22 Dec 2013 22:42:03 +0000
(17:42 -0500)
mods/default/nodes.lua
patch
|
blob
|
history
diff --git
a/mods/default/nodes.lua
b/mods/default/nodes.lua
index 3dee2257d8f1c6e222cdd762f9515735a6c6ba03..34b873e521da52ee623019dfb1383a0c4e0417c9 100644
(file)
--- 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..