move "tp" and "home" priv grant to join again :P
This commit is contained in:
parent
43f8f41126
commit
dad5317dbd
22
join.lua
22
join.lua
@ -1,12 +1,30 @@
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
|
||||
|
||||
-- current privs
|
||||
local privs = minetest.get_player_privs(player:get_player_name())
|
||||
|
||||
-- true if they were changed
|
||||
local privs_changed = false
|
||||
|
||||
-- grant default privs on join
|
||||
if not privs.tp then
|
||||
privs.tp = true
|
||||
privs_changed = true
|
||||
end
|
||||
|
||||
if not privs.home then
|
||||
privs.home = true
|
||||
privs_changed = true
|
||||
end
|
||||
|
||||
-- 2019-06-25
|
||||
-- revoke settime from non-admins
|
||||
if not privs.privs and privs.settime then
|
||||
privs["settime"] = nil
|
||||
privs_changed = true
|
||||
end
|
||||
|
||||
-- apply privs if changed
|
||||
if privs_changed then
|
||||
minetest.set_player_privs(player:get_player_name(), privs)
|
||||
end
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
|
||||
local privs = {
|
||||
{ xp = 100, name = "home" },
|
||||
{ xp = 10, name = "tp" },
|
||||
|
||||
{ xp = 500, name = "news_bypass" },
|
||||
|
||||
{ xp = 10000, name = "areas_protect" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user