Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = peripheral.find("openperipheral_sensor")
- whitelist = {}
- sp = 2
- function list()
- if fs.exists("whitelist") == false then
- shell.run("edit whitelist")
- else
- print("whitelist already exist!")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
- end
- function getList()
- local datafile = fs.open("whitelist", "r")
- for name in datafile.readLine do
- whitelist[name:lower()] = true
- end
- datafile.close()
- function Auth()
- term.setCursorPos(1,10)
- for t, result in ipairs(s.getPlayers()) do
- local name = result.name:lower()
- if whitelist[name] then
- -- if whitelist
- else
- -- if not whitelist
- end
- end
- end
- list()
- getList()
- while true do
- Auth()
- sleep(sp)
- end
Add Comment
Please, Sign In to add comment