From ef0beae00f963e68769e5a067ece09a42f43f291 Mon Sep 17 00:00:00 2001 From: Zorglube <630192+zorglube@users.noreply.github.com> Date: Thu, 20 Aug 2020 18:14:57 +0200 Subject: [PATCH] Add conf file var --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 3dfeeac..e65c284 100644 --- a/main.go +++ b/main.go @@ -20,11 +20,12 @@ var ( sKey string stats = newStreamStats() sAdminPass string + confFile string ) func setupSettings() error { var err error - settings, err = LoadSettings("settings.json") + settings, err = LoadSettings(confFile) if err != nil { return fmt.Errorf("Unable to load settings: %s", err) } @@ -53,6 +54,7 @@ func main() { flag.StringVar(&sKey, "k", "", "Stream key, to protect your stream") flag.StringVar(&sAdminPass, "a", "", "Set admin password. Overrides configuration in settings.json. This will not write the password to settings.json.") flag.BoolVar(&pullEmotes, "e", false, "Pull emotes") + flag.StringVar(&confFile, "f", "", "URI of the conf file") flag.Parse() format.RegisterAll()