From 93f9e3e0c7b5e6ceb7ebc16844c0e4c52477c485 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Sun, 8 Oct 2023 05:33:00 -0400 Subject: [PATCH] iteration --- packages/auth_server.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/auth_server.lua b/packages/auth_server.lua index 28c5bd5..32f8536 100644 --- a/packages/auth_server.lua +++ b/packages/auth_server.lua @@ -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