Advertisement
Guest User

Untitled

a guest
Jun 8th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. Arg = {...}
  2. rednet.open("right")
  3. debugmode = true
  4. function debug(debug)
  5. if debugmode == true then
  6.   print(debug)
  7.   end
  8. end
  9. function Cloud()
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. print("Owncloud is running. The ID is "..os.getComputerID())
  13. id,func,weg = rednet.receive()
  14. idc,content,weg = rednet.receive()
  15. if idc == id then
  16.   stuff = content
  17. end
  18. idc,content,weg = rednet.receive()
  19. if idc == id then
  20.  user = content
  21. end
  22. idc,content,weg = rednet.receive()
  23. if idc == id then
  24.   password = content
  25. end
  26. if fs.exists("/owncloud/user/"..user) == true then
  27.   ps = fs.open("/owncloud/user/"..user,"r")
  28.   wo = ps.readLine()
  29.   ps.close()
  30.   if wo == password then
  31.     if func == "logintest" then
  32.     rednet.send(id,"All right")
  33.     Cloud()
  34.     else
  35.     shell.run("/owncloud/plugins/"..func)
  36.   end
  37.     end
  38.   else
  39.     rednet.send(id,"Wrong login")
  40.     Cloud()
  41. else
  42.   rednet.send(id,"Wrong login")
  43.   Cloud()
  44. end
  45. end
  46. Cloud()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement