diff --git a/init.lua b/init.lua index 0c361ed..5aef834 100644 --- a/init.lua +++ b/init.lua @@ -58,11 +58,13 @@ irc:register_bot_command("login", { if not inChannel then return false, "You need to be in the server's channel to log in." end - local auth = minetest.auth_table[playerName] - if auth and minetest.get_password_hash(playerName, password) == auth.password then + local handler = minetest.get_auth_handler() + local auth = handler.get_auth(playerName) + if auth and minetest.check_password_entry(playerName, auth.password, password) then minetest.log("action", "User "..user.nick .." from IRC logs in as "..playerName) irc_users[user.nick] = playerName + handler.record_login(playerName) return true, "You are now logged in as "..playerName else minetest.log("action", user.nick.."@IRC attempted to log in as "