beef up whois

This commit is contained in:
Jeremy Latt
2014-02-17 19:08:57 -08:00
parent bd3ca4ae47
commit 9a5f21e78c
3 changed files with 45 additions and 6 deletions
+11 -4
View File
@@ -451,12 +451,19 @@ func (m *WhoisCommand) HandleServer(server *Server) {
for _, mask := range m.masks {
// TODO implement wildcard matching
mclient := server.clients[mask]
if mclient != nil {
client.Reply(RplWhoisUser(server, mclient))
mclient := server.clients.Get(mask)
if mclient == nil {
client.Reply(ErrNoSuchNick(server, mask))
continue
}
client.Reply(RplWhoisUser(mclient))
if client.flags[Operator] {
client.Reply(RplWhoisOperator(mclient))
}
client.Reply(RplWhoisIdle(mclient))
client.Reply(RplWhoisChannels(mclient))
client.Reply(RplEndOfWhois(server))
}
client.Reply(RplEndOfWhois(server))
}
func (msg *ChannelModeCommand) HandleServer(server *Server) {