iteration

This commit is contained in:
Layla 2023-10-08 05:33:00 -04:00
parent 44a98f1741
commit 93f9e3e0c7

View File

@ -186,11 +186,10 @@ while true do
rednet.send(client_id, "invalid request", "auth")
end
if data.users[request.username].groups == nil then
if data.users[request.username].groups == nil or data.users[request.username].groups[request.group] or data.users[request.username].groups[request.group] == false then
rednet.send(client_id, false, "auth")
else
local result = (data.users[request.username].groups[request.group] ~= nil) and data.users[request.username].groups[request.group] == true
rednet.send(client_id, data.users[request.username].groups[request.group] ~= nil, "auth")
rednet.send(client_id, true, "auth")
end
end