mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-18 21:25:31 +00:00
Better compatibility with perl sendxmpp config files.
This commit is contained in:
parent
d74b86c30c
commit
10feec99c8
@ -3,6 +3,7 @@
|
||||
## UNRELEASED
|
||||
### Changed
|
||||
- Properly handle lost connection.
|
||||
- Better compatibility with perl sendxmpp config files.
|
||||
|
||||
## [v0.8.3] 2024-02-17
|
||||
### Changed
|
||||
|
6
main.go
6
main.go
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user