mirror of
https://github.com/MinetestForFun/irc_modpack.git
synced 2024-12-23 01:00:36 +01:00
[irc & commands] Clean global variable and fix crash on auth_table
This commit is contained in:
parent
c8538c762b
commit
07e6a4dc54
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user