From 7161160667858ad04eb9612f5fe27e752af79c23 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 1 Jun 2016 11:57:57 -0400 Subject: [PATCH] Minor cleanup --- init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 6d88afc..0c361ed 100644 --- a/init.lua +++ b/init.lua @@ -56,11 +56,10 @@ irc:register_bot_command("login", { end end if not inChannel then - return false, "You need to be in the server's channel to login." + return false, "You need to be in the server's channel to log in." end - if minetest.auth_table[playerName] and - minetest.auth_table[playerName].password == - minetest.get_password_hash(playerName, password) then + local auth = minetest.auth_table[playerName] + if auth and minetest.get_password_hash(playerName, password) == auth.password then minetest.log("action", "User "..user.nick .." from IRC logs in as "..playerName) irc_users[user.nick] = playerName