1
0
mirror of https://github.com/MinetestForFun/irc_modpack.git synced 2024-11-16 06:40:19 +01: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
No known key found for this signature in database
GPG Key ID: A54DDB5272C51E8B
2 changed files with 1 additions and 3 deletions

View File

@ -185,8 +185,6 @@ function meta:think()
self.lastThought = socket.gettime()
end
local handlers = handlers
function meta:handle(msg)
local handler = irc.handlers[msg.command]
if handler then

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"