Moved manual account data override behind reading config.

http_upload
Martin Dosch 5 years ago
parent f61c0edda0
commit f0ccc244b8

@ -205,21 +205,6 @@ func main() {
recipients[i] = validatedJid
}
// Overwrite user if specified via command line flag.
if *flagUser != "" {
user = *flagUser
}
// Overwrite server if specified via command line flag.
if *flagServer != "" {
server = *flagServer
}
// Overwrite password if specified via command line flag.
if *flagPassword != "" {
password = *flagPassword
}
if *flagUser == "" || *flagServer == "" || *flagPassword == "" {
// Read configuration from file.
config, err := parseConfig(*flagFile)
@ -235,6 +220,21 @@ func main() {
}
}
// Overwrite user if specified via command line flag.
if *flagUser != "" {
user = *flagUser
}
// Overwrite server if specified via command line flag.
if *flagServer != "" {
server = *flagServer
}
// Overwrite password if specified via command line flag.
if *flagPassword != "" {
password = *flagPassword
}
// Set XMPP connection options.
options := xmpp.Options{
Host: server,

Loading…
Cancel
Save