mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-11 06:29:29 +01:00
Merge pull request #1397 from slingamn/resume_joinline
fix duplicated JOIN line sent to some resuming clients
This commit is contained in:
commit
6e2119be60
@ -993,19 +993,19 @@ func (channel *Channel) resumeAndAnnounce(session *Session) {
|
||||
// but really we should send it to voiced clients
|
||||
if !channel.flags.HasMode(modes.Auditorium) {
|
||||
for _, member := range channel.Members() {
|
||||
for _, session := range member.Sessions() {
|
||||
if session.capabilities.Has(caps.Resume) {
|
||||
for _, mSes := range member.Sessions() {
|
||||
if mSes == session || mSes.capabilities.Has(caps.Resume) {
|
||||
continue
|
||||
}
|
||||
|
||||
if session.capabilities.Has(caps.ExtendedJoin) {
|
||||
session.Send(nil, details.nickMask, "JOIN", chname, details.accountName, details.realname)
|
||||
if mSes.capabilities.Has(caps.ExtendedJoin) {
|
||||
mSes.Send(nil, details.nickMask, "JOIN", chname, details.accountName, details.realname)
|
||||
} else {
|
||||
session.Send(nil, details.nickMask, "JOIN", chname)
|
||||
mSes.Send(nil, details.nickMask, "JOIN", chname)
|
||||
}
|
||||
|
||||
if 0 < len(oldModes) {
|
||||
session.Send(nil, channel.server.name, "MODE", chname, oldModes, details.nick)
|
||||
mSes.Send(nil, channel.server.name, "MODE", chname, oldModes, details.nick)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
||||
Subproject commit b43e1278057113041ba51ced58571a2ad8dacb5c
|
||||
Subproject commit d741ab86d5f63782e746384a553f44b04a672ebb
|
Loading…
Reference in New Issue
Block a user