From 47f7b9a76e2a2bb2fbb3ecaebdd1f3a5d09aaa56 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 13 Dec 2020 15:44:10 -0500 Subject: [PATCH] make CAP LS/LIST respect the MaxLineLen constant --- irc/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/handlers.go b/irc/handlers.go index a03d2368..4c154c3e 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -476,7 +476,7 @@ func capHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Respo // so try as hard as possible to get the response to fit on one line. // :server.name CAP * LS * : // 1 7 4 - maxLen := 510 - 1 - len(server.name) - 7 - len(subCommand) - 4 + maxLen := (MaxLineLen - 2) - 1 - len(server.name) - 7 - len(subCommand) - 4 capLines := cset.Strings(version, values, maxLen) for i, capStr := range capLines { if version >= caps.Cap302 && i < len(capLines)-1 {