flagVersion:=getopt.BoolLong("version",0,"Show version information.")
flagMUCPassword:=getopt.StringLong("muc-password",0,"","Password for password protected MUCs.")
flagOx:=getopt.BoolLong("ox",0,"Use \"OpenPGP for XMPP\" encryption (experimental).")
@ -132,6 +126,7 @@ func main() {
flagOOBFile:=getopt.StringLong("oob-file",0,"","URL to send a file as out of band data.")
flagHeadline:=getopt.BoolLong("headline",0,"Send message as type headline.")
flagSCRAMPinning:=getopt.StringLong("scram-mech-pinning",0,"","Enforce the use of a certain SCRAM authentication mechanism.")
flagInsecureConnect:=getopt.BoolLong("insecure-connection-without-tls",0,"Connect without any security. DO NOT USE!")
// Parse command line flags.
getopt.Parse()
@ -148,6 +143,9 @@ func main() {
os.Exit(0)
// Quit if Ox (OpenPGP for XMPP) is requested for unsupported operations like
// groupchat, http-upload or listening.
case!*flagInsecureConnect:
fmt.Println("This version of go-sendxmpp is connecting without any encryption. It is only meant for debugging purposes if the server is running on the same machine. DO NOT USE except you know what your doing. Use --insecure-connection-without-tls if you want to use go-sendxmpp without TLS.")
os.Exit(0)
case*flagOx&&*flagHTTPUpload!="":
log.Fatal("No Ox support for http-upload available.")