Alias is not properly replaced

This commit is contained in:
Yohann D'ANELLO 2021-01-08 22:41:26 +01:00
parent e47aefd6df
commit ee16bf9e21
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 3 additions and 1 deletions

View File

@ -82,11 +82,13 @@ func Serve(streams *messaging.Streams, authBackend auth.Backend, cfg *Options) {
name, password := split[0], split[1]
if authBackend != nil {
// check password
if ok, name, err := authBackend.Login(name, password); !ok || err != nil {
ok, username, err := authBackend.Login(name, password)
if ok || err != nil {
log.Printf("Failed to authenticate for stream %s", name)
s.Close()
continue
}
name = username
}
go handleStreamer(s, streams, name)