diff --git a/auth_server.lua b/auth_server.lua index 27f7ab1..8f925bd 100644 --- a/auth_server.lua +++ b/auth_server.lua @@ -87,11 +87,11 @@ while true do if request.username == nil or request.password == nil then rednet.send(client_id, "invalid request") - else if data.users[request.username] == nil then + elseif data.users[request.username] == nil then rednet.send(client_id, "user not found") log(request.username .. " failed log in attempt") - else if convert_password(request.password) == data.users[request.username].password then + elseif convert_password(request.password) == data.users[request.username].password then local token = generate_token(request.username) rednet.send(client_id, token)