mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix analogous invalid parameters for ERR_NOSUCHNICK
This commit is contained in:
parent
aa8579b6e8
commit
0880f20f4b
4 changed files with 28 additions and 35 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue