From dc75b24d23e63bbda33fb869c5da45bd3615fc79 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 7 Nov 2021 13:32:18 -0500 Subject: [PATCH] clarify comment on CAP byte arithmetic --- irc/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/handlers.go b/irc/handlers.go index 1f5982a2..05cf3bda 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -517,8 +517,8 @@ func capHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response // 1. WeeChat 1.4 won't accept the CAP reply unless it contains the server.name source // 2. old versions of Kiwi and The Lounge can't parse multiline CAP LS 302 (#661), // so try as hard as possible to get the response to fit on one line. - // :server.name CAP * LS * : - // 1 7 4 + // :server.name CAP * LS * :\r\n + // 1 [ 7 ] [4 ] [2 ] maxLen := (MaxLineLen - 2) - 1 - len(server.name) - 7 - len(subCommand) - 4 capLines := cset.Strings(version, values, maxLen) for i, capStr := range capLines {