From d423f9c8b3cd8fa836e21168242c302a57744d49 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 30 Oct 2020 12:55:16 -0400 Subject: [PATCH] Change where config is saved --- chess.go | 1 - main.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chess.go b/chess.go index 35a65b3..9d2f459 100644 --- a/chess.go +++ b/chess.go @@ -14,7 +14,6 @@ import ( func chessCommand(m chat1.MsgSummary) { defer log.PanicSafe() - defer saveConfig() convID := string(m.ConvID) parts := strings.Split(m.Content.Text.Body, " ") if g, ok := config.Games[convID]; ok { diff --git a/main.go b/main.go index 2275066..789a0d3 100755 --- a/main.go +++ b/main.go @@ -26,6 +26,7 @@ var ( func printChat(m chat1.MsgSummary) { defer log.PanicSafe() + defer saveConfig() if m.Sender.Username == k.Username { return } @@ -40,7 +41,7 @@ func main() { loadConfig() fmt.Println("Starting log") log = loggy.NewLogger(config.LogOpts) - fmt.Println("Log configured?") + fmt.Println("Log configured") defer log.PanicSafe() log.LogInfo("Logger configured") chat := printChat