Advertisement
CryptekCoding

OC|Server

Jun 16th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. --[ Calls in and requires AP and/or components ]--
  2. local component = require("component") --allows use to call components
  3. local term = require("term") --enables us to use the term API
  4. local fs = require("filesystem") -- I think this might be fs instead of file system
  5. local event = require("event")
  6.  
  7. local m = component.modem
  8.  
  9. local whitelist = fs.open("/Server/Whitelist.txt",'r') --opening a file in read mode
  10. whitelist:read() --This reads all the data from the file and stores it into the variable whitelist
  11. whitelist:close()
  12.  
  13. local pswds = fs.open("/Server/passes.txt",'r') --opening a file in read mode
  14. pswds:read() -- This reads all the data from the file and stores it into the pswds variable
  15. pswds:close()
  16.  
  17. m.open(95)
  18.  
  19. function checkValue(address)
  20.  
  21. end
  22.  
  23. while true do
  24.  
  25. local _,me,who,port,_,message = os.pullEvent("modem_message")
  26. checkValue(who)
  27.  
  28. end
  29.  
  30. --[[ Files Structure
  31. computer1 = {"verylongstringaddress","passwordisstring"} --remove this comment once the code is complete.
  32. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement