iteration

This commit is contained in:
2023-10-08 02:44:20 -04:00
parent 22743c248c
commit a58ca7b94c
5 changed files with 35 additions and 35 deletions

View File

@@ -28,10 +28,10 @@ function lns_lookup(hostname)
}
lns_server_id = rednet.lookup("lns", lns_server)
rednet.send(lns_server_id, data)
rednet.send(lns_server_id, data, "lns")
while true do
id, msg = rednet.receive()
id, msg = rednet.receive("lns")
if id == lns_server_id then
if msg == nil then
return nil
@@ -57,10 +57,10 @@ if action == "login" then
["password"] = password
}
rednet.send(auth_server_id, data)
rednet.send(auth_server_id, data, "auth")
while true do
id, msg = rednet.receive()
id, msg = rednet.receive("auth")
if id == auth_server_id then
if msg == "invalid request" then
io.write("Invalid request\n")
@@ -103,10 +103,10 @@ if action == "register" then
["password"] = password
}
rednet.send(auth_server_id, data)
rednet.send(auth_server_id, data, "auth")
while true do
id, msg = rednet.receive()
id, msg = rednet.receive("auth")
if id == auth_server_id then
if msg == "invalid request" then
io.write("Invalid request\n")