Minor cleanup

This commit is contained in:
ShadowNinja 2016-06-01 11:57:57 -04:00
parent 0e79e91fd2
commit 7161160667
1 changed files with 3 additions and 4 deletions

View File

@ -56,11 +56,10 @@ irc:register_bot_command("login", {
end end
end end
if not inChannel then 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 end
if minetest.auth_table[playerName] and local auth = minetest.auth_table[playerName]
minetest.auth_table[playerName].password == if auth and minetest.get_password_hash(playerName, password) == auth.password then
minetest.get_password_hash(playerName, password) then
minetest.log("action", "User "..user.nick minetest.log("action", "User "..user.nick
.." from IRC logs in as "..playerName) .." from IRC logs in as "..playerName)
irc_users[user.nick] = playerName irc_users[user.nick] = playerName