CobraOs

Untitled

Nov 11th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. while true do
  2. local senderId, message, protocol = rednet.receive()
  3. if message == "getmail" then
  4. local senderId, message, protocol = rednet.receive()
  5. file = fs.open(message, "r")
  6. text = file.readAll()
  7. file.close()
  8. rednet.send(senderId, text)
  9. else
  10. local senderId, message2, protocol = rednet.receive()
  11. file = fs.open(message, "a")
  12. file.writeLine(message2)
  13. file.close()
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment