diff --git a/builtin.go b/builtin.go index 6153359..4b0a433 100644 --- a/builtin.go +++ b/builtin.go @@ -54,13 +54,11 @@ func (c *Client) registerBuiltins() { c.Handlers.register(true, KICK, HandlerFunc(updateLastActive)) // CAP IRCv3-specific tracking and functionality. - if !c.Config.disableCapTracking { - c.Handlers.register(true, CAP, HandlerFunc(handleCAP)) - c.Handlers.register(true, CAP_CHGHOST, HandlerFunc(handleCHGHOST)) - c.Handlers.register(true, CAP_AWAY, HandlerFunc(handleAWAY)) - c.Handlers.register(true, CAP_ACCOUNT, HandlerFunc(handleACCOUNT)) - c.Handlers.register(true, ALLEVENTS, HandlerFunc(handleTags)) - } + c.Handlers.register(true, CAP, HandlerFunc(handleCAP)) + c.Handlers.register(true, CAP_CHGHOST, HandlerFunc(handleCHGHOST)) + c.Handlers.register(true, CAP_AWAY, HandlerFunc(handleAWAY)) + c.Handlers.register(true, CAP_ACCOUNT, HandlerFunc(handleACCOUNT)) + c.Handlers.register(true, ALLEVENTS, HandlerFunc(handleTags)) } // Nickname collisions. diff --git a/cap.go b/cap.go index 591e996..5438ca3 100644 --- a/cap.go +++ b/cap.go @@ -25,7 +25,7 @@ var possibleCap = map[string][]string{ } func (c *Client) listCAP() { - if !c.Config.disableTracking && !c.Config.disableCapTracking { + if !c.Config.disableTracking { c.write(&Event{Command: CAP, Params: []string{CAP_LS, "302"}}) } } diff --git a/client.go b/client.go index 71f45fa..75c17c8 100644 --- a/client.go +++ b/client.go @@ -156,11 +156,6 @@ type Config struct { // disableTracking disables all channel and user-level tracking. Useful // for highly embedded scripts with single purposes. disableTracking bool - // disableCapTracking disables all network/server capability tracking. - // This includes determining what feature the IRC server supports, what - // the "NETWORK=" variables are, and other useful stuff. disableTracking - // cannot be enabled if you want to also tracking capabilities. - disableCapTracking bool // HandleNickCollide when set, allows the client to handle nick collisions // in a custom way. If unset, the client will attempt to append a // underscore to the end of the nickname, in order to bypass using @@ -336,24 +331,6 @@ func (c *Client) DisableTracking() { c.registerBuiltins() } -// DisableCapTracking disables all network/server capability tracking, and -// clears all internal handlers. This includes determining what feature the -// IRC server supports, what the "NETWORK=" variables are, and other useful -// stuff. DisableTracking() cannot be called if you want to also track -// capabilities. -func (c *Client) DisableCapTracking() { - // No need to mess with internal handlers. That should already be - // handled by the clear in Client.DisableTracking(). - if c.Config.disableCapTracking { - return - } - - c.debug.Print("disabling CAP tracking") - c.Config.disableCapTracking = true - c.Handlers.clearInternal() - c.registerBuiltins() -} - // Server returns the string representation of host+port pair for net.Conn. func (c *Client) Server() string { return fmt.Sprintf("%s:%d", c.Config.Server, c.Config.Port)