so I just started out playing minetest a couple of weeks ago and I've already fallen in love with the ease of modding and configuration as well as the outstanding community that has built so many amazing mods. So, first of all, to those involved: thank you!
I recently wanted to protect areas of the map on the server I'm hosting without revoking interact privileges from new players per se. I came across the areas mod by ShadowNinja, which restricts interaction in configurable areas on a per-user basis. Great! However, I would like to be able to assign areas to groups of users, rather than users individually. As indicated by this rather old github issue, I'm not alone with this!
Sadly, I didn't find a way of managing groups of users from within the minetest API. This seems like a pretty universal and useful feature to me, so I was kind of surprised not to find anything. I wasn't sure if I was missing something, but I wanted to get my hands dirty and develop a minetest mod anyway, so I started throwing together this usergroups mod.
github: https://github.com/cedrichaase/usergroups
Right now, this mod is only used in my fork of ShadowNinja's area mod.
Any feedback is greatly appreciated!
usergroups adds the following chatcommands:
Code: Select all
/groups_list [group]
Code: Select all
/groups_add <group> <username>
Code: Select all
/groups_remove <group> <username>
usergroups exposes the following API methods to other mods via a global table called "usergroups":
Code: Select all
usergroups:get_users(group)
Code: Select all
usergroups:group_exists(group)
Code: Select all
usergroups:user_is_in_group(user, group)