Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local commands = {}
- function commands.checkCommandAndRun(command)
- if not command then
- return false
- end
- if command == "/reboot" then
- os.reboot()
- return true
- end
- if command == "/shutdown" then
- os.shutdown()
- return true
- end
- if command == "/clear" then
- term.setCursorPos(1, 1)
- term.clear()
- end
- return false
- end
- return commands
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement