|
|
@ -198,6 +198,17 @@ func printUserScreen(redisClient *redis.Client, username string) string { |
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
clearScreen() |
|
|
|
clearScreen() |
|
|
|
printWelcomeScreen(redisClient) |
|
|
|
printWelcomeScreen(redisClient) |
|
|
|
|
|
|
|
case "e": |
|
|
|
|
|
|
|
hackRCLoc := fmt.Sprintf("%s/user/%s/.nethackrc", config.NethackLauncher.HackDir, username) |
|
|
|
|
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
|
|
|
|
clearScreen() |
|
|
|
|
|
|
|
nh := exec.Command("vim", hackRCLoc) |
|
|
|
|
|
|
|
nh.Stdout = os.Stdout |
|
|
|
|
|
|
|
nh.Stdin = os.Stdin |
|
|
|
|
|
|
|
nh.Stderr = os.Stderr |
|
|
|
|
|
|
|
nh.Run() |
|
|
|
|
|
|
|
clearScree() |
|
|
|
|
|
|
|
printUserScreen(redisClient, username) |
|
|
|
case "w": |
|
|
|
case "w": |
|
|
|
clearScreen() |
|
|
|
clearScreen() |
|
|
|
printProgressScreen(redisClient, username) |
|
|
|
printProgressScreen(redisClient, username) |
|
|
|