minetest_docs icon indicating copy to clipboard operation
minetest_docs copied to clipboard

`set_player_privs` footguns

Open appgurueu opened this issue 3 years ago • 0 comments

Both of these warrant a DANGER admonition:

  1. Attempting to use set_player_privs incrementally by doing just minetest.set_player_privs(name, {my_priv = true}) and expecting it to grant my_priv (whereas in reality it revokes all privs except for my_priv)
  2. Attempting to use set_player_privs as if a boolean false value was treated as revoking a priv (whereas the privs are a set and thus this is treated as granting the priv): privs.my_priv = false; minetest.set_player_privs(name, privs)

@rollerozxa is being assigned for heretic variable naming inherited from a poorly written Sudoku game.

appgurueu avatar Oct 11 '22 18:10 appgurueu