This commit is contained in:
Martin Dosch 2022-04-25 18:14:42 +02:00
parent 87345d1959
commit 4390c8369a

17
main.go
View File

@ -135,6 +135,12 @@ func main() {
log.Fatal("No Ox support for chat rooms available.")
case *flagOx && *flagListen:
log.Fatal("No Ox support for receiving messages available.")
case *flagHttpUpload != "" && *flagInteractive:
log.Fatal("Interactive mode and http upload can't" +
" be used at the same time.")
case *flagHttpUpload != "" && *flagMessageFile != "":
log.Fatal("You can't send a message while using" +
" http upload.")
}
// Read recipients from command line and quit if none are specified.
@ -186,17 +192,6 @@ func main() {
resource = "go-sendxmpp." + getShortID()
}
if (*flagHttpUpload != "") && (*flagInteractive || (*flagMessageFile != "")) {
if *flagInteractive {
log.Fatal("Interactive mode and http upload can't" +
" be used at the same time.")
}
if *flagMessageFile != "" {
log.Fatal("You can't send a message while using" +
" http upload.")
}
}
// Timeout
timeout := time.Duration(*flagTimeout * 1000000000)