3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 11:59:40 +01:00
RPL_WHOISCHANNELS didn't have proper line breaks
This commit is contained in:
Shivaram Lingamneni 2022-04-24 02:47:31 -04:00
parent 504cc44bf7
commit 51cdebf167

View File

@ -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")) whoischannels := client.whoisChannelsNames(target, rb.session.capabilities.Has(caps.MultiPrefix), oper.HasRoleCapab("sajoin"))
if whoischannels != nil { 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) { if target.HasMode(modes.Operator) && operStatusVisible(client, target, oper != nil) {
tOper := target.Oper() tOper := target.Oper()