Advertisement
bryceio

ServerLogin

Feb 13th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. modem=peripheral.wrap("back")
  2. modem.open(753)
  3. admin = "bryceio"
  4. local memes, are, kings, user = os.pullEvent("modem_message")
  5. if are == 753 and kings == 921 then
  6. local test = fs.exists("login/"..user)
  7. if test == false then
  8.     modem.transmit("Error404")
  9.     shell.run("startup")
  10. end
  11. file = fs.open("login/"..user)
  12. local fileData = {}
  13. repeat
  14. table.insert(fileData,line)
  15. line = file.readLine()
  16. until line == nil
  17. file.close()
  18. local password = fileData[2]
  19. modem.transmit(921, 753, password)
  20. shell.run("startup")
  21. else
  22. shell.run("startup")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement