Browse Source

Cleanup password prompts

master
Matthew Faltys 5 years ago
parent
commit
f3f20f53a2
  1. 8
      nethack-launcher/print_change_password_screen.go
  2. 4
      nethack-launcher/print_register_screen.go

8
nethack-launcher/print_change_password_screen.go

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

4
nethack-launcher/print_register_screen.go

@ -12,12 +12,10 @@ import (
)
func printRegisterScreen(redisClient *redis.Client) {
// TODO : configure password restriction checking
fmt.Printf(" %s\n", config.NethackLauncher.ServerDisplay)
println("")
println(" Welcome new user. Please enter a username")
println(" Only characters and numbers are allowed, with no spaces.")
println(" 20 characters max. (blank entry aborts)")
println(" Blank entry aborts")
println("")
fmt.Printf(">> ")

Loading…
Cancel
Save