From fd8fd3e2528ca5e698b74ae5412286197ce7002c Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 12 May 2019 19:23:45 -0400 Subject: [PATCH] don't require a config file for mksecret --- oragono.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/oragono.go b/oragono.go index 77f8a1fb..fe2f9069 100644 --- a/oragono.go +++ b/oragono.go @@ -59,7 +59,7 @@ Options: arguments, _ := docopt.ParseArgs(usage, nil, version) - // don't require a config file for genpasswd + // don't require a config file for genpasswd or mksecret if arguments["genpasswd"].(bool) { var password string fd := int(os.Stdin.Fd()) @@ -85,6 +85,9 @@ Options: fmt.Println() } return + } else if arguments["mksecret"].(bool) { + fmt.Println(utils.GenerateSecretKey()) + return } configfile := arguments["--conf"].(string) @@ -130,8 +133,6 @@ Options: log.Fatal(" Could not create certificate:", err.Error()) } } - } else if arguments["mksecret"].(bool) { - fmt.Println(utils.GenerateSecretKey()) } else if arguments["run"].(bool) { if !arguments["--quiet"].(bool) { logman.Info("server", fmt.Sprintf("Oragono v%s starting", irc.SemVer))