From 2985cf1798fc76e113654c35daf75ab8a412293c Mon Sep 17 00:00:00 2001 From: Ignacio Losiggio Date: Fri, 31 Dec 2021 17:24:51 -0300 Subject: [PATCH] Fix SASL on libera.chat While deploying a bot to libera.chat we were unable to connect via SASL because the ACK was never recognized. The reason for that rested on this weird space. This patch checks that a trimmed version of the second argument is equal to `sasl`. This is enough for our personal purposes. --- lib/irc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irc.js b/lib/irc.js index 23ccfe08..27285a85 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -599,7 +599,7 @@ function Client(server, nick, opt) { case 'CAP': if (message.args[0] === '*' && message.args[1] === 'ACK' && - message.args[2] === 'sasl ') // there's a space after sasl + message.args[2].trim() === 'sasl') // there's a space after sasl self.send('AUTHENTICATE', 'PLAIN'); break; case 'AUTHENTICATE':