rarkenin wrote:You can look at files in the "players" subdirectory of the world directory(i.e. minetest.getworldpath()). If the file exists, the player should exist. You can also read auth.txt.
That works if you are using a decent file system, but not if you aren't. Windows, in all it's stupidity, is case insensitive, so checking for a file for RARKENIN would return true if rarkenin was a player, not only is RARKENIN was. I have considered this before, to try to fix /sharearea in my land claims.
addi wrote:Why so complicated?
the internal auth handler saves all the players in the variable
minetest.auth_table [playername]u need to check only if the name in the table.
(i dont know but maybe lua has a search function that searches the table)
btw: it stores the privs here and the password hashes
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.auth_table[playername].privs
minetest.auth_table[playername].password
Awesome, thanks! You just fixed my /sharearea command.