|
|
|
@ -226,7 +226,7 @@ func main() {
|
|
|
|
|
flagUser := getopt.StringLong("username", 'u', "", "Username for XMPP account.")
|
|
|
|
|
flagPassword := getopt.StringLong("password", 'p', "", "Password for XMPP account.")
|
|
|
|
|
flagChatroom := getopt.BoolLong("chatroom", 'c', "Send message to a chatroom.")
|
|
|
|
|
flagTLS := getopt.BoolLong("tls", 't', "Use direct TLS.")
|
|
|
|
|
flagDirectTLS := getopt.BoolLong("tls", 't', "Use direct TLS.")
|
|
|
|
|
flagResource := getopt.StringLong("resource", 'r', "", "Set resource. "+
|
|
|
|
|
"When sending to a chatroom this is used as 'alias'.")
|
|
|
|
|
flagFile := getopt.StringLong("file", 'f', "", "Set configuration file. (Default: "+
|
|
|
|
@ -331,8 +331,8 @@ func main() {
|
|
|
|
|
DialTimeout: 1 * time.Second,
|
|
|
|
|
Resource: resource,
|
|
|
|
|
Password: password,
|
|
|
|
|
NoTLS: !*flagTLS,
|
|
|
|
|
StartTLS: !*flagTLS,
|
|
|
|
|
NoTLS: !*flagDirectTLS,
|
|
|
|
|
StartTLS: !*flagDirectTLS,
|
|
|
|
|
Debug: *flagDebug,
|
|
|
|
|
TLSConfig: &tlsConfig,
|
|
|
|
|
}
|
|
|
|
@ -346,7 +346,7 @@ func main() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Connect to server.
|
|
|
|
|
client, err := connect(options, *flagTLS)
|
|
|
|
|
client, err := connect(options, *flagDirectTLS)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|