From bf99ab600133a768ce231126db4d477dcd88d1bb Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 9 Mar 2022 11:42:48 +0100 Subject: [PATCH] Set EnableCapabilityNegotiation to false by default. Fix wrong variable reference in method SupportsCapability --- client/connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/connection.go b/client/connection.go index ce1b355..8ed5a84 100644 --- a/client/connection.go +++ b/client/connection.go @@ -143,7 +143,7 @@ func NewConfig(nick string, args ...string) *Config { Recover: (*Conn).LogPanic, // in dispatch.go SplitLen: defaultSplit, Timeout: 60 * time.Second, - EnableCapabilityNegotiation: true, + EnableCapabilityNegotiation: false, } cfg.Me.Ident = "goirc" if len(args) > 0 && args[0] != "" { @@ -306,7 +306,7 @@ func (conn *Conn) DisableStateTracking() { // SupportsCapability returns true if the server supports the given capability. func (conn *Conn) SupportsCapability(cap string) bool { - return conn.currCaps.Has(cap) + return conn.supportedCaps.Has(cap) } // HasCapability returns true if the given capability has been acked by the server during negotiation.