Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shaka = require("API")
- local _, maxY = term.getSize()
- shaka.clearScreen()
- function listen()
- local x, y = term.getCursorPos()
- local senderID, message = rednet.receive("listen")
- if y >= maxY - 1 then
- shaka.clearScreen()
- term.setBackgroundColor(colors.gray)
- term.clearLine()
- print("Intercepting requests:\n")
- term.setBackgroundColor(colors.black)
- end
- shaka.split(message, " ")
- niceName = shaka.prettyName(result[1])
- channel = result[3]
- print(channel.. ": " ..niceName)
- end
- function click()
- event = os.pullEvent("mouse_click")
- os.reboot()
- end
- term.setBackgroundColor(colors.gray)
- term.clearLine()
- print("Intercepting requests:\n")
- term.setBackgroundColor(colors.black)
- while true do
- parallel.waitForAny(listen, click)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement