Compare commits

..

2 Commits

Author SHA1 Message Date
8a2b861ab8 iteration 2023-10-07 23:45:04 -04:00
20a18ebb8c iteration 2023-10-07 23:43:03 -04:00
2 changed files with 13 additions and 9 deletions

View File

@ -42,7 +42,6 @@ while true do
if request.action == nil or request.hostname == nil then if request.action == nil or request.hostname == nil then
rednet.send(client_id, "invalid request") rednet.send(client_id, "invalid request")
return
end end
if request.action == "lookup" then if request.action == "lookup" then

View File

@ -28,9 +28,13 @@ rednet.send(receiverID, data)
while true do while true do
id, msg = rednet.receive() id, msg = rednet.receive()
if id == receiverID then
if msg == "ok" then if msg == "ok" then
print("Registered with LNS Server Successfully!") print("Registered with LNS Server Successfully!")
break break
else
print("Failed to register with LNS Server! Error: " .. msg)
break
end end
-- timeout after 5 seconds -- timeout after 5 seconds
@ -38,4 +42,5 @@ while true do
print("Failed to register with LNS Server! Timeout!") print("Failed to register with LNS Server! Timeout!")
break break
end end
end
end end