Compare commits
2 Commits
e24d7f7a23
...
8a2b861ab8
Author | SHA1 | Date | |
---|---|---|---|
8a2b861ab8 | |||
20a18ebb8c |
@ -42,7 +42,6 @@ while true do
|
||||
|
||||
if request.action == nil or request.hostname == nil then
|
||||
rednet.send(client_id, "invalid request")
|
||||
return
|
||||
end
|
||||
|
||||
if request.action == "lookup" then
|
||||
|
@ -28,14 +28,19 @@ rednet.send(receiverID, data)
|
||||
|
||||
while true do
|
||||
id, msg = rednet.receive()
|
||||
if msg == "ok" then
|
||||
print("Registered with LNS Server Successfully!")
|
||||
break
|
||||
end
|
||||
if id == receiverID then
|
||||
if msg == "ok" then
|
||||
print("Registered with LNS Server Successfully!")
|
||||
break
|
||||
else
|
||||
print("Failed to register with LNS Server! Error: " .. msg)
|
||||
break
|
||||
end
|
||||
|
||||
-- timeout after 5 seconds
|
||||
if os.time() - current_time > 5 then
|
||||
print("Failed to register with LNS Server! Timeout!")
|
||||
break
|
||||
-- timeout after 5 seconds
|
||||
if os.time() - current_time > 5 then
|
||||
print("Failed to register with LNS Server! Timeout!")
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user