iteration

This commit is contained in:
Layla 2023-10-08 02:57:56 -04:00
parent 0510472f3c
commit a7761faf62
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ local action = args[1]
settings.define("auth.token", {
description = "Authentication token",
type = "number",
default = ""
default = -1
})
settings.define("auth.server", {
@ -85,7 +85,7 @@ if action == "login" then
end
if action == "logout" then
settings.set("auth.token", nil)
settings.set("auth.token", -1)
settings.save()
io.write("Logged out\n")
return

View File

@ -104,7 +104,7 @@ while true do
end
if request.action == "token" then
if request.token == nil or request.token == "" then
if request.token == nil or request.token == "" or request.token == -1 then
rednet.send(client_id, "invalid request", "auth")
else