1
0
Fork 0
forked from External/ergo

review fixes

This commit is contained in:
Shivaram Lingamneni 2019-09-08 06:22:34 -04:00
parent f6eb8fa5a1
commit 3cb9234bb5
5 changed files with 14 additions and 13 deletions

View file

@ -569,11 +569,11 @@ func capHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Respo
sendCapLines := func(cset *caps.Set, values caps.Values) {
version := rb.session.capVersion
capLines := cset.String(version, values)
capLines := cset.Strings(version, values)
// weechat 1.4 has a bug here where it won't accept the CAP reply unless it contains
// the server.name source:
for i, capStr := range capLines {
if version == caps.Cap302 && i < len(capLines)-1 {
if version >= caps.Cap302 && i < len(capLines)-1 {
rb.Add(nil, server.name, "CAP", details.nick, subCommand, "*", capStr)
} else {
rb.Add(nil, server.name, "CAP", details.nick, subCommand, capStr)