From ed8de2a77a6073068ab81989ff2a1a8aefe2c697 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 3 Sep 2020 18:37:18 -0400 Subject: [PATCH] remove dead code --- irc/client_lookup_set.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/irc/client_lookup_set.go b/irc/client_lookup_set.go index f0d435cb..9ae0033b 100644 --- a/irc/client_lookup_set.go +++ b/irc/client_lookup_set.go @@ -28,14 +28,6 @@ func (clients *ClientManager) Initialize() { clients.bySkeleton = make(map[string]*Client) } -// Count returns how many clients are in the manager. -func (clients *ClientManager) Count() int { - clients.RLock() - defer clients.RUnlock() - count := len(clients.byNick) - return count -} - // Get retrieves a client from the manager, if they exist. func (clients *ClientManager) Get(nick string) *Client { casefoldedName, err := CasefoldName(nick) @@ -262,21 +254,6 @@ func (clients *ClientManager) AllClients() (result []*Client) { return } -// AllWithCaps returns all clients with the given capabilities. -func (clients *ClientManager) AllWithCaps(capabs ...caps.Capability) (sessions []*Session) { - clients.RLock() - defer clients.RUnlock() - for _, client := range clients.byNick { - for _, session := range client.Sessions() { - if session.capabilities.HasAll(capabs...) { - sessions = append(sessions, session) - } - } - } - - return -} - // 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)