Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mdmside = ""
- local channel = 0
- local password = ""
- local noexit = true
- local modem = peripheral.wrap(mdmside)
- modem.open(channel)
- while noexit do
- io.write("Smart home controller Command: ")
- cmd = io.read()
- if cmd == "/exit" then
- term.clear()
- term.setCursorPos(1, 1)
- write("Password: ")
- pswd = read("*")
- if pswd == password then
- noexit = false
- print("Correct password")
- else
- print("Incorrect password")
- end
- else
- modem.transmit(channel, channel, cmd)
- end
- end
Add Comment
Please, Sign In to add comment