Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local privs = minetest.get_player_privs(player:get_player_name())
- print(dump(privs))
- local forbidden=0
- if privs["fly"] then forbidden = 1 end
- if privs["give"] then forbidden = 1 end
- if privs["teleport"] then forbidden = 1 end
- if privs["bring"] then forbidden = 1 end
- if privs["settime"] then forbidden = 1 end
- if privs["rollback"] then forbidden = 1 end
- if privs["server"] then forbidden = 1 end
- if privs["privs"] then forbidden = 1 end
- if privs["ban"] then forbidden = 1 end
- if not forbidden then return end
- print ("Illegal priviledges detected.")
- -- make a formspec here, display warnin message
- while true do
- --check the privs in the loop again - user can change settings with console
- --or will exit, so two ways to exit the loop.
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement