mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 00:19:29 +01:00
fix #1860
CS AMODE changes should take immediate effect even if the nick does not match the account.
This commit is contained in:
parent
3e32e3f19e
commit
9d9ee11224
@ -270,9 +270,13 @@ func csAmodeHandler(service *ircService, server *Server, client *Client, command
|
|||||||
// #729: apply change to current membership
|
// #729: apply change to current membership
|
||||||
for _, member := range channel.Members() {
|
for _, member := range channel.Members() {
|
||||||
if member.Account() == change.Arg {
|
if member.Account() == change.Arg {
|
||||||
applied, change := channel.applyModeToMember(client, change, rb)
|
// applyModeToMember takes the nickname, not the account name,
|
||||||
|
// so translate:
|
||||||
|
modeChange := change
|
||||||
|
modeChange.Arg = member.Nick()
|
||||||
|
applied, modeChange := channel.applyModeToMember(client, modeChange, rb)
|
||||||
if applied {
|
if applied {
|
||||||
announceCmodeChanges(channel, modes.ModeChanges{change}, server.name, "*", "", false, rb)
|
announceCmodeChanges(channel, modes.ModeChanges{modeChange}, server.name, "*", "", false, rb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user