mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-15 00:15:10 +00:00
cleanup
This commit is contained in:
parent
87345d1959
commit
4390c8369a
17
main.go
17
main.go
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user