Don't forward duplicate JOIN commands
Closes: https://todo.sr.ht/~emersion/soju/171 git-svn-id: file:///srv/svn/repo/suika/trunk@758 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
d5a071dd91
commit
8a03d66c9f
@ -1771,6 +1771,11 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Most servers ignore duplicate JOIN messages. We ignore them here
|
||||||
|
// because some clients automatically send JOIN messages in bulk
|
||||||
|
// when reconnecting to the bouncer. We don't want to flood the
|
||||||
|
// upstream connection with these.
|
||||||
|
if !uc.channels.Has(upstreamName) {
|
||||||
params := []string{upstreamName}
|
params := []string{upstreamName}
|
||||||
if key != "" {
|
if key != "" {
|
||||||
params = append(params, key)
|
params = append(params, key)
|
||||||
@ -1779,6 +1784,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
|||||||
Command: "JOIN",
|
Command: "JOIN",
|
||||||
Params: params,
|
Params: params,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
ch := uc.network.channels.Value(upstreamName)
|
ch := uc.network.channels.Value(upstreamName)
|
||||||
if ch != nil {
|
if ch != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user