|
|
@ -12,21 +12,13 @@ import ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func printChangePasswordScreen(redisClient *redis.Client, username string) { |
|
|
|
func printChangePasswordScreen(redisClient *redis.Client, username string) { |
|
|
|
// TODO : configure password restriction checking
|
|
|
|
|
|
|
|
clearScreen() |
|
|
|
clearScreen() |
|
|
|
fmt.Printf(" %s\n", config.NethackLauncher.ServerDisplay) |
|
|
|
fmt.Printf(" %s\n", config.NethackLauncher.ServerDisplay) |
|
|
|
println("") |
|
|
|
println("") |
|
|
|
fmt.Printf(" Welcome %s\n", username) |
|
|
|
fmt.Printf(" Welcome %s\n", username) |
|
|
|
println(" Only characters and numbers are allowed, with no spaces.") |
|
|
|
|
|
|
|
println(" 20 characters max. (blank entry aborts)") |
|
|
|
|
|
|
|
println("") |
|
|
|
println("") |
|
|
|
//fmt.Printf(">> ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scanner := bufio.NewScanner(os.Stdin) |
|
|
|
scanner := bufio.NewScanner(os.Stdin) |
|
|
|
//for scanner.Scan() {
|
|
|
|
|
|
|
|
// if scanner.Text() == "" {
|
|
|
|
|
|
|
|
// printUserScreen(redisClient, username)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// turn off echo display
|
|
|
|
// turn off echo display
|
|
|
|
exec.Command("stty", "-F", "/dev/tty", "-echo").Run() |
|
|
|
exec.Command("stty", "-F", "/dev/tty", "-echo").Run() |
|
|
|