From c8701febd0d76dfefd30585a75d11acf534e5f32 Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Fri, 21 Feb 2014 11:09:46 -0800 Subject: [PATCH] loosen restrictions on WHO replies --- irc/server.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/irc/server.go b/irc/server.go index 8863001d..6a8bdda5 100644 --- a/irc/server.go +++ b/irc/server.go @@ -562,16 +562,22 @@ func (msg *WhoCommand) HandleServer(server *Server) { mask := string(msg.mask) if mask == "" { for _, channel := range server.channels { - whoChannel(client, channel) + for member := range channel.members { + if !client.flags[Invisible] { + client.RplWhoReply(channel, member) + } + } } } else if IsChannel(mask) { channel := server.channels[mask] if channel != nil { - whoChannel(client, channel) + for member := range channel.members { + client.RplWhoReply(channel, member) + } } } else { mclient := server.clients[mask] - if mclient != nil && !mclient.flags[Invisible] { + if mclient != nil { client.RplWhoReply(nil, mclient) } }