3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 00:19:29 +01:00
CS AMODE changes should take immediate effect even if the nick
does not match the account.
This commit is contained in:
Shivaram Lingamneni 2021-12-08 23:45:02 -05:00
parent 3e32e3f19e
commit 9d9ee11224

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)
}
}
}