1
0
mirror of https://github.com/MinetestForFun/irc_modpack.git synced 2025-06-28 14:16:04 +02:00

[irc & commands] Clean global variable and fix crash on auth_table

This commit is contained in:
LeMagnesium
2016-08-21 00:19:27 +02:00
parent c8538c762b
commit 07e6a4dc54
2 changed files with 1 additions and 3 deletions

View File

@ -181,7 +181,7 @@ irc:register_bot_command("login", {
local u, m = checkToken(playerName, password, user.nick)
if not u then
if minetest.auth_table[playerName].password:sub(1,3) == "#1#" then -- First SRP mechanism
if minetest.auth_table and minetest.auth_table[playerName] and minetest.auth_table[playerName].password:sub(1,3) == "#1#" then -- First SRP mechanism
if not irc_tokens[playerName] then
return false, "No token available for your nickname. " ..
"Please consider generating one with /gen_token"