3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

don't require a config file for mksecret

This commit is contained in:
Shivaram Lingamneni 2019-05-12 19:23:45 -04:00
parent 18cf816396
commit fd8fd3e252

View File

@ -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))