fix analogous invalid parameters for ERR_NOSUCHNICK

This commit is contained in:
Shivaram Lingamneni 2019-12-05 06:52:07 -05:00
parent aa8579b6e8
commit 0880f20f4b
4 changed files with 28 additions and 35 deletions

View file

@ -7,12 +7,14 @@ package irc
import "github.com/oragono/oragono/irc/modes"
type empty struct{}
// ClientSet is a set of clients.
type ClientSet map[*Client]bool
type ClientSet map[*Client]empty
// Add adds the given client to this set.
func (clients ClientSet) Add(client *Client) {
clients[client] = true
clients[client] = empty{}
}
// Remove removes the given client from this set.
@ -22,7 +24,8 @@ func (clients ClientSet) Remove(client *Client) {
// Has returns true if the given client is in this set.
func (clients ClientSet) Has(client *Client) bool {
return clients[client]
_, ok := clients[client]
return ok
}
// MemberSet is a set of members with modes.