iteration
This commit is contained in:
parent
268e92d12a
commit
7fcae7b276
8
dig.lua
8
dig.lua
@ -18,6 +18,12 @@ rednet.send(receiverID, data)
|
||||
while true do
|
||||
id, msg = rednet.receive()
|
||||
if id == receiverID then
|
||||
io.write(msg .. "\n")
|
||||
if msg == nil then
|
||||
print("Hostname not found!")
|
||||
break
|
||||
else
|
||||
io.write(msg .. "\n")
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
@ -48,7 +48,7 @@ while true do
|
||||
|
||||
-- check if hostname in data
|
||||
if request.hostname == nil then
|
||||
rednet.send(client_id, "not found")
|
||||
rednet.send(client_id, nil)
|
||||
else
|
||||
rednet.send(client_id, data[request.hostname])
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user