iteration
This commit is contained in:
parent
2128066f14
commit
697906c953
@ -109,13 +109,17 @@ while true do
|
||||
rednet.send(client_id, "invalid request", "auth")
|
||||
else
|
||||
|
||||
local found = false
|
||||
for user, userdata in pairs(data.users) do
|
||||
if userdata.token == request.token then
|
||||
rednet.send(client_id, user, "auth")
|
||||
found = true
|
||||
end
|
||||
end
|
||||
|
||||
rednet.send(client_id, "invalid token", "auth")
|
||||
if not found then
|
||||
rednet.send(client_id, "invalid token", "auth")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user