mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
upgrade to go 1.18, use generics
This commit is contained in:
parent
446c654dea
commit
a549827f17
15 changed files with 60 additions and 67 deletions
|
|
@ -3424,7 +3424,7 @@ func whoHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response
|
|||
// Construct set of channels the client is in.
|
||||
userChannels := make(ChannelSet)
|
||||
for _, channel := range client.Channels() {
|
||||
userChannels[channel] = empty{}
|
||||
userChannels.Add(channel)
|
||||
}
|
||||
|
||||
// Another client is a friend if they share at least one channel, or they are the same client.
|
||||
|
|
@ -3437,7 +3437,7 @@ func whoHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response
|
|||
if channel.flags.HasMode(modes.Auditorium) {
|
||||
return false // TODO this should respect +v etc.
|
||||
}
|
||||
if _, present := userChannels[channel]; present {
|
||||
if userChannels.Has(channel) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue