iteration
This commit is contained in:
4
lns.lua
4
lns.lua
@ -15,7 +15,7 @@ function lns_lookup(hostname)
|
|||||||
lns_server_id = rednet.lookup("lns", lns_server)
|
lns_server_id = rednet.lookup("lns", lns_server)
|
||||||
if lns_server_id == nil then
|
if lns_server_id == nil then
|
||||||
io.write("LNS Server not found!\n")
|
io.write("LNS Server not found!\n")
|
||||||
return
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -52,9 +52,9 @@ if action == "lookup" then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local id = lns_lookup(hostname)
|
local id = lns_lookup(hostname)
|
||||||
cache[hostname] = id
|
|
||||||
if id ~= nil then
|
if id ~= nil then
|
||||||
io.write(id)
|
io.write(id)
|
||||||
|
cache[hostname] = id
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif action == "clear" then
|
elseif action == "clear" then
|
||||||
|
Reference in New Issue
Block a user