From 4113d5bab4ad06d065c15faf36e165d38d743226 Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Fri, 12 Oct 2018 14:30:58 -0500 Subject: [PATCH] Grant new player faction user priv. --- factions.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/factions.lua b/factions.lua index f28d94b..ada708e 100644 --- a/factions.lua +++ b/factions.lua @@ -1016,5 +1016,14 @@ minetest.is_protected = function(pos, player) end end +function grant_new_player_faction_user_priv(player) + local name = player.name + local privs = minetest.get_player_privs(name) + privs.faction_user = true + minetest.set_player_privs(name, privs) +end + +register_on_newplayer(grant_new_player_faction_user_priv) + hudUpdate() factionUpdate() \ No newline at end of file