Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- print("Waiting for command")
- local id, message = rednet.receive()
- function split (inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- local t={}
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- table.insert(t, str)
- end
- return t
- end
- local commandAndArgs = split(tostring(message))
- shell.run(commandAndArgs[1], commandAndArgs[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement