minimal who command

This commit is contained in:
Jeremy Latt
2014-02-08 18:49:52 -08:00
parent d8951e1b48
commit d370abcd4c
4 changed files with 72 additions and 1 deletions
+13
View File
@@ -239,6 +239,19 @@ func RplChannelModeIs(server *Server, channel *Channel) Reply {
channel.name, channel.ModeString())
}
// <channel> <user> <host> <server> <nick> ( "H" / "G" ) ["*"] [ ( "@" / "+" ) ]
// :<hopcount> <real name>
func RplWhoReply(server *Server, channel *Channel, client *Client) Reply {
return NewNumericReply(server, RPL_WHOREPLY, "%s %s %s %s %s H :0 %s",
channel.name, client.username, client.hostname, server.name, client.nick,
client.realname)
}
// <name> :End of WHO list
func RplEndOfWho(server *Server, name string) Reply {
return NewNumericReply(server, RPL_ENDOFWHO, "%s :End of WHO list", name)
}
// errors (also numeric)
func ErrAlreadyRegistered(source Identifier) Reply {