From a6a8548466928927bcbae08ddd303bc7c059ad95 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 12 Nov 2020 11:57:30 -0500 Subject: [PATCH] fix SAJOIN not sending a MODE line where applicable --- irc/channel.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc/channel.go b/irc/channel.go index d444de74..eeeb06d7 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -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