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