2018-04-29 14:17:41 +00:00
|
|
|
local f = fs.open("conf", "r")
|
|
|
|
local conf = textutils.unserialise(f.readAll())
|
|
|
|
f.close()
|
|
|
|
|
2018-04-29 14:32:49 +00:00
|
|
|
-- Queries Dragon servers. In a loop.
|
2018-04-29 14:17:41 +00:00
|
|
|
local function query(m)
|
|
|
|
local msg
|
|
|
|
repeat
|
|
|
|
rednet.broadcast(m, "dragon")
|
|
|
|
_, msg = rednet.receive("dragon", 1)
|
|
|
|
until msg
|
|
|
|
return msg
|
|
|
|
end
|
|
|
|
|
|
|
|
return { conf = conf, query = query }
|