Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- while true do
- senderID,message = rednet.receive()
- if message then
- local messageArr = textutils.unserailise(message)
- if messageArr then
- --Check message formats for cmd
- if messageArr["requestRoute"] then
- local resp = {}
- resp["hops"] = 1
- resp["route"] = {os.getComputerID()}
- resp["relay"] = false
- resp["sever"] = true
- local ms = textutils.serialise(resp)
- rednet.send(senderID,ms)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement