From 267c51bbbf13847ee2bc2eda60ef11573c5b9157 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Sun, 28 Apr 2019 15:57:42 +1000 Subject: [PATCH] Review fix --- irc/client_lookup_set.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irc/client_lookup_set.go b/irc/client_lookup_set.go index 6bdf74d2..1982d968 100644 --- a/irc/client_lookup_set.go +++ b/irc/client_lookup_set.go @@ -209,11 +209,12 @@ func (clients *ClientManager) AllWithCaps(capabs ...caps.Capability) (sessions [ // AllWithCapsNotify returns all clients with the given capabilities, and that support cap-notify. func (clients *ClientManager) AllWithCapsNotify(capabs ...caps.Capability) (sessions []*Session) { + capabs = append(capabs, caps.CapNotify) clients.RLock() defer clients.RUnlock() for _, client := range clients.byNick { for _, session := range client.Sessions() { - capabs = append(capabs, caps.CapNotify) + // cap-notify is implicit in cap version 302 and above if session.capabilities.HasAll(capabs...) || 302 <= session.capVersion { sessions = append(sessions, session) }