3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

use ChannelSet

This commit is contained in:
Shivaram Lingamneni 2020-08-04 01:10:22 -04:00
parent 15c54e80de
commit ddac7d94a8

View File

@ -2998,9 +2998,9 @@ func whoHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Respo
}
} else {
// Construct set of channels the client is in.
userChannels := make(map[*Channel]bool)
userChannels := make(ChannelSet)
for _, channel := range client.Channels() {
userChannels[channel] = true
userChannels[channel] = empty{}
}
// Another client is a friend if they share at least one channel, or they are the same client.
@ -3010,7 +3010,7 @@ func whoHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Respo
}
for _, channel := range otherClient.Channels() {
if userChannels[channel] {
if _, present := userChannels[channel]; present {
return true
}
}