mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix whois reply
This commit is contained in:
parent
e1c4c8e8cc
commit
c1edddb9a1
@ -155,14 +155,16 @@ func (channel *Channel) SetTopic(client *Client, topic string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if channel.flags[OpOnlyTopic] && !channel.members[client][ChannelOperator] {
|
if channel.flags[OpOnlyTopic] && !channel.ClientIsOperator(client) {
|
||||||
client.ErrChanOPrivIsNeeded(channel)
|
client.ErrChanOPrivIsNeeded(channel)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
channel.topic = topic
|
channel.topic = topic
|
||||||
|
|
||||||
|
reply := RplTopicMsg(client, channel)
|
||||||
for member := range channel.members {
|
for member := range channel.members {
|
||||||
member.replies <- RplTopicMsg(client, channel)
|
member.replies <- reply
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,8 +309,9 @@ func (channel *Channel) Kick(client *Client, target *Client, comment string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reply := RplKick(channel, client, target, comment)
|
||||||
for member := range channel.members {
|
for member := range channel.members {
|
||||||
member.replies <- RplKick(channel, client, target, comment)
|
member.replies <- reply
|
||||||
}
|
}
|
||||||
channel.Quit(target)
|
channel.Quit(target)
|
||||||
}
|
}
|
||||||
|
@ -526,12 +526,12 @@ func (m *WhoisCommand) HandleServer(server *Server) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
client.RplWhoisUser(mclient)
|
client.RplWhoisUser(mclient)
|
||||||
if client.flags[Operator] {
|
if mclient.flags[Operator] {
|
||||||
client.RplWhoisOperator(mclient)
|
client.RplWhoisOperator(mclient)
|
||||||
}
|
}
|
||||||
client.RplWhoisIdle(mclient)
|
client.RplWhoisIdle(mclient)
|
||||||
client.MultilineReply(client.WhoisChannelsNames(), RPL_WHOISCHANNELS,
|
client.MultilineReply(mclient.WhoisChannelsNames(), RPL_WHOISCHANNELS,
|
||||||
"%s :%s", client.Nick())
|
"%s :%s", mclient.Nick())
|
||||||
client.RplEndOfWhois()
|
client.RplEndOfWhois()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user