Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t_args = {...}
- config = t_args[1]
- modem = t_args[2]
- modem.open(config["network_port"])
- gui.clear()
- gui.title("Alpha Cloud - v"..config["version"])
- gui.jumpLine()
- gui.text("In order to create an account, you need to choose a username and a password. Make sure your password is strong enough, so nobody can find it!")
- gui.jumpLine()
- username_x, username_y = gui.field("Username")
- password_x, password_y = gui.field("Password")
- term.setCursorPos(username_x, username_y)
- username = read()
- term.setCursorPos(password_x, password_y)
- password = read("*")
- gui.clear()
- gui.title("Alpha Cloud - v"..config["version"])
- gui.jumpLine()
- if ftp.register(modem,config["network_port"],config["default_timeout"],username,password) then
- gui.text("Your account has been succesfuly created!")
- else
- gui.text("An account with the same username already exists, please change your username!")
- end
- os.sleep(3)
- os.reboot()
Add Comment
Please, Sign In to add comment