Merge pull request #1383 from slingamn/chanserv

fix output bugs in AMODE handling
This commit is contained in:
Shivaram Lingamneni 2020-11-12 23:41:32 -08:00 committed by GitHub
commit 4fc396c3ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -820,6 +820,11 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
// don't send topic and names for a SAJOIN of a different client
channel.SendTopic(client, rb, false)
channel.Names(client, rb)
} else {
// ensure that SAJOIN sends a MODE line to the originating client, if applicable
if givenMode != 0 {
rb.Add(nil, client.server.name, "MODE", chname, modestr, details.nick)
}
}
// TODO #259 can be implemented as Flush(false) (i.e., nonblocking) while holding joinPartMutex

View File

@ -265,7 +265,7 @@ func csAmodeHandler(server *Server, client *Client, command string, params []str
if member.Account() == change.Arg {
applied, change := channel.applyModeToMember(client, change, rb)
if applied {
announceCmodeChanges(channel, modes.ModeChanges{change}, chanservMask, "*", "", rb)
announceCmodeChanges(channel, modes.ModeChanges{change}, server.name, "*", "", rb)
}
}
}
@ -312,7 +312,7 @@ func csOpHandler(server *Server, client *Client, command string, params []string
},
rb)
if applied {
announceCmodeChanges(channelInfo, modes.ModeChanges{change}, chanservMask, "*", "", rb)
announceCmodeChanges(channelInfo, modes.ModeChanges{change}, server.name, "*", "", rb)
}
csNotice(rb, client.t("Successfully granted operator privileges"))