minetestpro wrote:try the help on the commands in minetest i think theres something u can use their
Edit: first response to dis post gettin there XD
minetest.auth_table[playername].privs
minetest.auth_table[playername].passwordrarkenin 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.
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 hashesYour 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
-- check if the player exists
local privs = minetest.get_player_privs( name );
f( not( privs ) or not( privs.interact )) then
minetest.chat_send_player(name, "Player ""..name.."" not found or has no interact privs.");
return;
end
Sokomine wrote:Oh, almost forgot about this thread. I solved the problem in a similar way addi was suggesting:
-- check if the player exists
local privs = minetest.get_player_privs( name );
f( not( privs ) or not( privs.interact )) then
minetest.chat_send_player(name, "Player ""..name.."" not found or has no interact privs.");
return;
end
That's another function that ought to be part of a general lib.
Sokomine wrote:Oh, almost forgot about this thread. I solved the problem in a similar way addi was suggesting: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
-- check if the player exists
local privs = minetest.get_player_privs( name );
f( not( privs ) or not( privs.interact )) then
minetest.chat_send_player(name, "Player ""..name.."" not found or has no interact privs.");
return;
end
That's another function that ought to be part of a general lib.
Users browsing this forum: Bing [Bot] and 9 guests