Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- event, modemSide, senderChannel1, replyChannel1, user = os.pullEvent("modem_message") -- User = specific user, senderChannel =
- if (event ~= "modem_message") then
- os.reboot()
- end
- modem.transmit(replyChannel1, 0, "Processing Request")
- if (senderChannel1 == 1) then
- --code
- end
- if(senderChannel1 == 2) then
- pass = samePC(replyChannel1)
- if(fs.exists(user) == true) then
- login = fs.open(user .."/pass", "r")
- temp = login.readLine()
- login.close()
- if (temp == pass) then
- modem.transmit(replyChannel1, 0, 1) -- Password correct
- else
- modem.transmit(replyChannel1, 0, 2) -- Password incorrect
- end
- else
- modem.transmit(replyChannel1, 0, 0) -- user doesn't exist error
- end
- end
- --etc
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement