channel: Fix MODE and WHO

This commit is contained in:
Daniel Oaks 2016-10-16 21:28:59 +10:00
parent 78f0064347
commit 425a521d27
3 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ type Client struct {
isDestroyed bool
isQuitting bool
hasQuit bool
hops uint
hops int
hostname string
idleTimer *time.Timer
monitoring map[string]bool

View File

@ -209,7 +209,7 @@ var (
func modeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
_, errChan := CasefoldChannel(msg.Params[0])
if errChan != nil {
if errChan == nil {
return cmodeHandler(server, client, msg)
} else {
return umodeHandler(server, client, msg)

View File

@ -699,7 +699,7 @@ func (target *Client) RplWhoReply(channel *Channel, client *Client) {
flags += channel.members[client].Prefixes(target.capabilities[MultiPrefix])
channelName = channel.name
}
target.Send(nil, target.server.name, RPL_WHOREPLY, target.nick, channelName, client.username, client.hostname, client.server.name, client.nick, flags, string(client.hops), client.realname)
target.Send(nil, target.server.name, RPL_WHOREPLY, target.nick, channelName, client.username, client.hostname, client.server.name, client.nick, flags, strconv.Itoa(client.hops)+" "+client.realname)
}
func whoChannel(client *Client, channel *Channel, friends ClientSet) {