|
|
|
@ -75,11 +75,12 @@ func printProgressScreen(redisClient *redis.Client, username string) {
|
|
|
|
|
// set ttyrec path
|
|
|
|
|
ttyName, _ := redisClient.Get(fmt.Sprintf("inprogress:%s", user[0])).Result() |
|
|
|
|
ttyrecPath := fmt.Sprintf("%s/user/%s/ttyrec/%s.ttyrec", config.NethackLauncher.HackDir, user[0], ttyName) |
|
|
|
|
fullCommand := fmt.Sprintf("ttyplay -n %s && ttyplay -p %s", ttyrecPath, ttyrecPath) |
|
|
|
|
|
|
|
|
|
// restart display
|
|
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
|
clearScreen() |
|
|
|
|
nh := exec.Command("ttyplay", "-p", ttyrecPath) |
|
|
|
|
nh := exec.Command("bash", "-c", fullCommand) |
|
|
|
|
nh.Stdout = os.Stdout |
|
|
|
|
nh.Stdin = os.Stdin |
|
|
|
|
nh.Stderr = os.Stderr |
|
|
|
|