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:
parent
78f0064347
commit
425a521d27
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user