mirror of
https://github.com/MinetestForFun/irc_modpack.git
synced 2024-12-23 07:20:20 +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()
|
self.lastThought = socket.gettime()
|
||||||
end
|
end
|
||||||
|
|
||||||
local handlers = handlers
|
|
||||||
|
|
||||||
function meta:handle(msg)
|
function meta:handle(msg)
|
||||||
local handler = irc.handlers[msg.command]
|
local handler = irc.handlers[msg.command]
|
||||||
if handler then
|
if handler then
|
||||||
|
@ -181,7 +181,7 @@ irc:register_bot_command("login", {
|
|||||||
|
|
||||||
local u, m = checkToken(playerName, password, user.nick)
|
local u, m = checkToken(playerName, password, user.nick)
|
||||||
if not u then
|
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
|
if not irc_tokens[playerName] then
|
||||||
return false, "No token available for your nickname. " ..
|
return false, "No token available for your nickname. " ..
|
||||||
"Please consider generating one with /gen_token"
|
"Please consider generating one with /gen_token"
|
||||||
|
Loading…
Reference in New Issue
Block a user