Advertisement
Guest User

server_pass

a guest
May 29th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. -- config --
  2. local user = "8000sudios"
  3. local pass = "minecraft"
  4. local side = "right" -- the side that the modem is on --
  5. -- end of config --
  6.  
  7. local computer_id = os.getComputerID()
  8.  
  9. term.clear()
  10. print("Running password server 1.0")
  11. print("computer id: "..computer_id)
  12.  
  13. rednet.open(side)
  14.  
  15. id, message = rednet.receive()
  16.  
  17. if message == 103 then
  18.  print("send1")
  19.    rednet.send(id, 111)
  20. else
  21. os.reboot()
  22. end
  23.  
  24. local id2, suser = rednet.receive()
  25.   if suser == user then
  26.      print("send2")
  27.      rednet.send(id2, "122")
  28.   else
  29.     rednet.send(id2, "121")
  30.     os.reboot()
  31.   end
  32.  
  33. local id3, spass = rednet.receive()
  34.  
  35.   if spass == pass then
  36.   rednet.send(id3, "132")
  37.   os.reboot()
  38.   else
  39.   rednet.send(id3, "131")
  40.   os.reboot()
  41.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement