|
@@ -629,14 +629,16 @@ func (server *Server) splitMessage(original string, origIs512 bool) SplitMessage
|
629
|
629
|
|
630
|
630
|
// WhoisChannelsNames returns the common channel names between two users.
|
631
|
631
|
func (client *Client) WhoisChannelsNames(target *Client) []string {
|
632
|
|
- isMultiPrefix := target.capabilities.Has(caps.MultiPrefix)
|
|
632
|
+ isMultiPrefix := client.capabilities.Has(caps.MultiPrefix)
|
633
|
633
|
var chstrs []string
|
634
|
|
- for _, channel := range client.Channels() {
|
|
634
|
+ for _, channel := range target.Channels() {
|
635
|
635
|
// channel is secret and the target can't see it
|
636
|
|
- if !target.flags[modes.Operator] && channel.HasMode(modes.Secret) && !channel.hasClient(target) {
|
637
|
|
- continue
|
|
636
|
+ if !client.flags[modes.Operator] {
|
|
637
|
+ if (target.HasMode(modes.Invisible) || channel.HasMode(modes.Secret)) && !channel.hasClient(client) {
|
|
638
|
+ continue
|
|
639
|
+ }
|
638
|
640
|
}
|
639
|
|
- chstrs = append(chstrs, channel.ClientPrefixes(client, isMultiPrefix)+channel.name)
|
|
641
|
+ chstrs = append(chstrs, channel.ClientPrefixes(target, isMultiPrefix)+channel.name)
|
640
|
642
|
}
|
641
|
643
|
return chstrs
|
642
|
644
|
}
|