2023-10-08 05:48:43 +02:00
|
|
|
local args = { ... }
|
|
|
|
|
2023-10-08 05:49:51 +02:00
|
|
|
modem_location = "right"
|
|
|
|
lns_server = "default"
|
|
|
|
|
2023-10-08 05:48:43 +02:00
|
|
|
rednet.open(modem_location)
|
|
|
|
receiverID = rednet.lookup("lns", lns_server)
|
|
|
|
current_time = os.time()
|
|
|
|
|
|
|
|
|
|
|
|
data = {
|
|
|
|
["action"] = "lookup",
|
|
|
|
["hostname"] = args[1]
|
|
|
|
}
|
|
|
|
|
|
|
|
rednet.send(receiverID, data)
|
|
|
|
|
|
|
|
while true do
|
|
|
|
id, msg = rednet.receive()
|
|
|
|
if id == receiverID then
|
|
|
|
io.write(msg .. "\n")
|
|
|
|
end
|
|
|
|
end
|