3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00

Merge pull request #1861 from slingamn/issue1860_amode

fix #1860
This commit is contained in:
Shivaram Lingamneni 2021-12-09 04:18:14 -05:00 committed by GitHub
commit 0d0d9e72b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,9 +270,13 @@ func csAmodeHandler(service *ircService, server *Server, client *Client, command
// #729: apply change to current membership
for _, member := range channel.Members() {
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 {
announceCmodeChanges(channel, modes.ModeChanges{change}, server.name, "*", "", false, rb)
announceCmodeChanges(channel, modes.ModeChanges{modeChange}, server.name, "*", "", false, rb)
}
}
}