diff --git a/config.gcfg b/config.gcfg index edb3b60..7ff46cc 100644 --- a/config.gcfg +++ b/config.gcfg @@ -1,7 +1,7 @@ [nethacklauncher] loglevel = "debug" serverdisplay = "unixvoid.com underground nethack server" - nethackversion = "3.7.0-nightly" + nethackversion = "3.6.3" hackdir = "/hack" nhdatlocation = "/NetHack/dat/nhdat" recoverbinary = "/NetHack/util/recover" diff --git a/deps/Dockerfile b/deps/Dockerfile index dd7475e..597351e 100644 --- a/deps/Dockerfile +++ b/deps/Dockerfile @@ -5,7 +5,6 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ redis-server \ openssh-server \ - curl \ autoconf \ bison \ bsdmainutils \ @@ -32,13 +31,13 @@ RUN apt-get clean # RUN git clone https://github.com/NetHack/NetHack.git RUN cd NetHack && \ + git checkout NetHack-3.6 && \ sed -i 's/#ifndef SYSCF/#ifdef SYSCF/g' include/config.h && \ sys/unix/setup.sh sys/unix/hints/linux && \ sed -i '/POSTINSTALL=/d' Makefile && \ sed -i 's/.*-DSYSCF -DSYSCF_FILE=.*/CFLAGS+=-DSECURE/' Makefile && \ sed -i 's/#CFLAGS+=-DSCORE_ON_BOTL/CFLAGS+=-DSCORE_ON_BOTL/' Makefile && \ cat Makefile && \ - make fetch-Lua && \ make all && \ make install RUN find /* -name nethack diff --git a/nethack-launcher/print_progress_screen.go b/nethack-launcher/print_progress_screen.go index 783793c..b0016a5 100644 --- a/nethack-launcher/print_progress_screen.go +++ b/nethack-launcher/print_progress_screen.go @@ -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