From 9fa2a77567104d0e10b66c70d300220297207ab6 Mon Sep 17 00:00:00 2001 From: Russ Garrett Date: Thu, 21 Feb 2019 12:20:50 +0000 Subject: [PATCH] Fix SASL where additional caps are requested Where additional caps were requested using `RequestCaps`, SASL would send an `AUTHENTICATE` command for each one which servers don't like. Check that we're responding to the correct `CAP ACK`. --- irc_sasl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc_sasl.go b/irc_sasl.go index fd9df7b..3346a46 100644 --- a/irc_sasl.go +++ b/irc_sasl.go @@ -20,7 +20,7 @@ func (irc *Connection) setupSASLCallbacks(result chan<- *SASLResult) { result <- &SASLResult{true, errors.New("no SASL capability " + e.Arguments[2])} } } - if e.Arguments[1] == "ACK" { + if e.Arguments[1] == "ACK" && e.Arguments[2] == "sasl" { if irc.SASLMech != "PLAIN" { result <- &SASLResult{true, errors.New("only PLAIN is supported")} }