xXm0dzXx

Untitled

Sep 30th, 2013
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. for i, j in pairs( rs.getSides() ) do
  2. if peripheral.getType( j ) == "modem" then
  3. rednet.open( j )
  4. end
  5. end
  6.  
  7. local monitor = peripheral.wrap("back")
  8.  
  9. while true do
  10. local id, message = rednet.receive()
  11.  
  12. if id == 579 then
  13. if message == "_getSize" then
  14. term.redirect( monitor )
  15. rednet.send(id, textutils.serialize( { term.getSize() } ))
  16. term.restore()
  17. elseif message == "_update" then
  18. fs.delete( "startup" )
  19. shell.run( "pastebin", "get", "xY6EsJnq", "startup" )
  20. os.reboot()
  21. end
  22. end
  23.  
  24. print(id.. "> " ..message)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment