[Mod] Node Owner [20120817][node_owner] - auto node protection
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
[Mod] Node Owner [20120817][node_owner] - auto node protection
Node Owner for Minetest
Blocks you place are owned by you and others cannot dig them or place onto them.
Documentation | GitHub Project
About
This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.
Credits
mauvebic - code ideas came from his universal_node_ownership mod
randomproof - code ideas came from his node_ownership mod
License
BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Blocks you place are owned by you and others cannot dig them or place onto them.
Documentation | GitHub Project
About
This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.
Credits
mauvebic - code ideas came from his universal_node_ownership mod
randomproof - code ideas came from his node_ownership mod
License
BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Last edited by cornernote on Thu Jan 16, 2014 11:10, edited 1 time in total.
-
- Member
- Posts: 570
- Joined: Fri Feb 17, 2012 21:55
- Location: Canada
Whoo!
We are what we create.
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 65
- Joined: Tue Jul 31, 2012 07:38
- Location: italy
vktRus wrote:Admin can not remove any block?
Add a timeout for the protection of the week.
i do it, https://github.com/pagliaccio/minetest-node_owner/
i have send a pull request at cornernote on github
- Pythagoras
- Member
- Posts: 14
- Joined: Mon Nov 05, 2012 00:29
- Location: Vienna
revokes and grants are not correctly evaluated in some test cases. probably caused by "privs" being nowhere defined inside the mod.
it works if you replace
with
it works if you replace
Code: Select all
privs.admin_node ~= true
Code: Select all
minetest.get_player_privs(player)["admin_node"] ~= true
Re: [Mod] Node Owner [20120817][node_owner] - auto node prot
Hi,
My server was crashing because privs was nil. I checked for nil as follows.
The issue is now itemstack is not returned if privs are nil. This is causing the cannons mod to crash. Could you help resolve the issue since my fix is half baked. I have a lot of mods, only the cannons is crashing so maybe the fix has to be there. Either way, willing to help resolve the issue.
My server was crashing because privs was nil. I checked for nil as follows.
Code: Select all
aa0001@minetest01:~/minetest/mods$ diff node_owner/node_owner/init.lua ~/minetest/minetest-0.4.12-neuromancer/mods/node_owner/node_owner/init.lua
23,26c23,28
< if owner ~= player and owner ~= '' and privs.admin_node ~= true then
< minetest.chat_send_player(player, "You can not place nodes here because it is owned by "..owner..".")
< return itemstack
< end
---
> if (privs ~= nil) then
> if owner ~= player and owner ~= '' and privs.admin_node ~= true then
> minetest.chat_send_player(player, "You can not place nodes here because it is owned by "..owner..".")
> return itemstack
> end
> end
46,48c48,52
< if owner ~= player and owner ~= '' and privs.admin_node ~= true then
< minetest.chat_send_player(player, "You can not dig this node because it is owned by "..owner..".")
< return
---
> if (privs ~= nil) then
> if owner ~= player and owner ~= '' and privs.admin_node ~= true then
> minetest.chat_send_player(player, "You can not dig this node because it is owned by "..owner..".")
> return
> end
-
- Member
- Posts: 197
- Joined: Tue Dec 24, 2013 17:01
- GitHub: chaoswormz
- IRC: CWz
- In-game: CWz
- Location: Banana Land
Re: [Mod] Node Owner [20120817][node_owner] - auto node prot
My advice would be to use the areas mod this mod is outdated and hasn't been updated since 2012
Re: [Mod] Node Owner [20120817][node_owner] - auto node prot
Thanks for the info!
Ben
Ben
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod] Node Owner [20120817][node_owner] - auto node prot
Thanks to Cornernote for this mod.
Updated by me to work with Minetest v0.4.16, might work with versions from v0.4.13, but this is untested by me.
The solution was to simply add the param2 parameter to Cornernotes custom item_place_node definition.
DOWNLOAD: https://github.com/ShadMOrdre/node_owne ... master.zip
Browse Code: https://github.com/ShadMOrdre/node_owner
Updated by me to work with Minetest v0.4.16, might work with versions from v0.4.13, but this is untested by me.
The solution was to simply add the param2 parameter to Cornernotes custom item_place_node definition.
DOWNLOAD: https://github.com/ShadMOrdre/node_owne ... master.zip
Browse Code: https://github.com/ShadMOrdre/node_owner
Who is online
Users browsing this forum: No registered users and 1 guest