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
- print("Logged in")
- else
- print(message)
- end
- end
- userInterface.init("top","owner,admin,mod")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("========User Logon=========")
- print("Version: 1.0")
- print("Username: ")
- local username = read()
- print("Password: ")
- local pass = read("*")
- userInterface.login(username,pass)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement