3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00

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

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