From a28d524a8deff526b17aa7f8d4dac203817e34bd Mon Sep 17 00:00:00 2001 From: Matthew Faltys Date: Fri, 8 Nov 2019 20:56:36 +0000 Subject: [PATCH] Add nethack run command --- config.gcfg | 1 + nethack-launcher.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.gcfg b/config.gcfg index d0cf04c..a01802c 100644 --- a/config.gcfg +++ b/config.gcfg @@ -1,6 +1,7 @@ [nethacklauncher] loglevel = "debug" serverdisplay = "unixvoid.com underground nethack server" + nethackversion = "3.6.0" recordlocation = "record" reclistlocation = "reclist" bootstrapdelay = 1 diff --git a/nethack-launcher.go b/nethack-launcher.go index ce7bbf1..fff37aa 100644 --- a/nethack-launcher.go +++ b/nethack-launcher.go @@ -20,6 +20,7 @@ type Config struct { NethackLauncher struct { Loglevel string ServerDisplay string + NethackVersion string RecordLocation string ReclistLocation string BootstrapDelay time.Duration @@ -163,7 +164,7 @@ func printUserScreen(redisClient *redis.Client, username string) string { println("") println(" l) Logout") println(" w) Watch games in progress") - println(" p) Play NetHack 3.6.0") + fmt.Printf(" p) Play NetHack %s\n", config.NethackLauncher.NethackVersion) println(" q) Quit") println("") fmt.Printf(">> ")