From 51cdebf167aeba46d1cbeb3fd591a9ccac93c5a7 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 24 Apr 2022 02:47:31 -0400 Subject: [PATCH] fix #1935 RPL_WHOISCHANNELS didn't have proper line breaks --- irc/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc/server.go b/irc/server.go index 341623e1..be852a0b 100644 --- a/irc/server.go +++ b/irc/server.go @@ -506,7 +506,9 @@ func (client *Client) getWhoisOf(target *Client, hasPrivs bool, rb *ResponseBuff whoischannels := client.whoisChannelsNames(target, rb.session.capabilities.Has(caps.MultiPrefix), oper.HasRoleCapab("sajoin")) if whoischannels != nil { - rb.Add(nil, client.server.name, RPL_WHOISCHANNELS, cnick, tnick, strings.Join(whoischannels, " ")) + for _, line := range utils.BuildTokenLines(400, whoischannels, " ") { + rb.Add(nil, client.server.name, RPL_WHOISCHANNELS, cnick, tnick, line) + } } if target.HasMode(modes.Operator) && operStatusVisible(client, target, oper != nil) { tOper := target.Oper()