fix SAJOIN not sending a MODE line where applicable

This commit is contained in:
Shivaram Lingamneni 2020-11-12 11:57:30 -05:00
parent a8ffb11deb
commit a6a8548466
1 changed files with 5 additions and 0 deletions

View File

@ -820,6 +820,11 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
// don't send topic and names for a SAJOIN of a different client
channel.SendTopic(client, rb, false)
channel.Names(client, rb)
} else {
// ensure that SAJOIN sends a MODE line to the originating client, if applicable
if givenMode != 0 {
rb.Add(nil, client.server.name, "MODE", chname, modestr, details.nick)
}
}
// TODO #259 can be implemented as Flush(false) (i.e., nonblocking) while holding joinPartMutex