Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local userInterface = {}
- function userInterface.init(side,ranks)
- userInterface.ranks = ranks
- rednet.open(side)
- rednet.broadcast("userServer")
- senderID,message = rednet.receive(10)
- userInterface.serverID = senderID
- end
- function userInterface.login(user,pass)
- rednet.send(userInterface.serverID,"auth "..user.." "..pass.." "..userInterface.ranks)
- senderID,message = rednet.receive(10)
- if message == "Correct" then
- return true
- end
- return false
- end
- -- ranks = "owner,admin,mod,user"
- userInterface.init("top","owner,,admin,mod,user")
- while true do
- term.clear()
- print("========User Logon=========")
- print("Version: 1.0")
- print("Username: ")
- local username = read()
- print("Password: ")
- local pass = read("*")
- local authed = userInterface.login(username,pass)
- if authed == false then
- print("LOL No auth")
- else
- print("Authed")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement