Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local senderId, message, protocol = rednet.receive()
- if message == "getmail" then
- local senderId, message, protocol = rednet.receive()
- file = fs.open(message, "r")
- text = file.readAll()
- file.close()
- rednet.send(senderId, text)
- else
- local senderId, message2, protocol = rednet.receive()
- file = fs.open(message, "a")
- file.writeLine(message2)
- file.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment