Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Master--
- local tArgs = { ... }
- local sides = {"top","bottom","left","right","front","back"}
- for _,v in ipairs(sides) do
- if peripheral.getType( v ) == "modem" then
- rednet.open( v )
- end
- end
- if tArgs[1]:lower() == "master" then
- term.clear()
- term.setCursorPos(1,1)
- check()
- function check()
- while true do
- local f = io.read()
- if f == "ls" then
- shell.run("ls")
- elseif f == "clr" then
- shell.run("clr")
- elseif fs.exists(f) then
- local h = fs.open(f)
- file = h.readAll()
- h.close()
- rednet.broadcast(file,"sm")
- else
- rednet.broadcast(f,"sm")
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment