Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- if disk.isPresent("left")==true then
- side = "left"
- end
- if disk.isPresent("right")==true then
- side = "right"
- end
- if disk.isPresent("top")==true then
- side = "top"
- end
- if disk.isPresent("bottom")==true then
- side = "bottom"
- end
- print(side)
- if disk.getLabel(side)==nil then
- print("There is an invalid disk/object in the " .. side .. "disk drive. Put a valid disk with a label into it.")
- sleep(5)
- os.reboot()
- end
- local log = fs.open("disk/chatlog", "a")
- while true do
- local event, key = os.pullEvent("char")
- key = keys.getName(key)
- print(log.readAll)
- if key == "enter" then
- log.writeLine("")
- else
- log.write(key)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement