Better compatibility with perl sendxmpp config files.

This commit is contained in:
Martin Dosch 2024-02-20 20:45:43 +01:00
parent d74b86c30c
commit 10feec99c8
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@
## UNRELEASED
### Changed
- Properly handle lost connection.
- Better compatibility with perl sendxmpp config files.
## [v0.8.3] 2024-02-17
### Changed

View File

@ -217,6 +217,12 @@ func main() {
if *flagPassword != "" {
password = *flagPassword
}
// If no server part is specified in the username but a server is specified
// just assume the server is identical to the server part and hope for the
// best. This is for compatibility with the old perl sendxmpp config files.
if !strings.Contains(user, "@") && server != "" {
user = user + "@" + server
}
switch {
// Use "go-sendxmpp" if no nick is specified via config or command line flag.