From c305bcd99516431a5842d32b52553b22031a1481 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Sun, 8 Oct 2023 04:49:28 -0400 Subject: [PATCH] iteration --- lib/auth.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/auth.lua b/lib/auth.lua index 1b2e74c..ad3460a 100644 --- a/lib/auth.lua +++ b/lib/auth.lua @@ -10,6 +10,7 @@ settings.define("auth.server", { default = "auth.box" }) + function get_token() return settings.get("auth.token") end @@ -21,6 +22,7 @@ function check_user_group(username, group) ["group"] = group } + local auth_server_id = lns.lookup(settings.get("auth.server")) rednet.send(auth_server_id, data, "auth") while true do @@ -53,6 +55,7 @@ function list_user_groups(username) ["username"] = username } + local auth_server_id = lns.lookup(settings.get("auth.server")) rednet.send(auth_server_id, data, "auth") while true do @@ -82,6 +85,7 @@ function add_user_to_group(username, group) ["token"] = get_token() } + local auth_server_id = lns.lookup(settings.get("auth.server")) rednet.send(auth_server_id, data, "auth") while true do