3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

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 isDestroyed bool
isQuitting bool isQuitting bool
hasQuit bool hasQuit bool
hops uint hops int
hostname string hostname string
idleTimer *time.Timer idleTimer *time.Timer
monitoring map[string]bool monitoring map[string]bool

View File

@ -209,7 +209,7 @@ var (
func modeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { func modeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
_, errChan := CasefoldChannel(msg.Params[0]) _, errChan := CasefoldChannel(msg.Params[0])
if errChan != nil { if errChan == nil {
return cmodeHandler(server, client, msg) return cmodeHandler(server, client, msg)
} else { } else {
return umodeHandler(server, client, msg) 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]) flags += channel.members[client].Prefixes(target.capabilities[MultiPrefix])
channelName = channel.name 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) { func whoChannel(client *Client, channel *Channel, friends ClientSet) {