Avoid sending JOIN twice for the same channel
This commit is contained in:
parent
45d118dd12
commit
7114c8a1e9
@ -11,12 +11,6 @@ func forwardChannel(dc *downstreamConn, ch *upstreamChannel) {
|
||||
|
||||
downstreamName := dc.marshalChannel(ch.conn, ch.Name)
|
||||
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.prefix(),
|
||||
Command: "JOIN",
|
||||
Params: []string{downstreamName},
|
||||
})
|
||||
|
||||
if ch.Topic != "" {
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
|
@ -700,6 +700,12 @@ func (dc *downstreamConn) register() error {
|
||||
dc.forEachUpstream(func(uc *upstreamConn) {
|
||||
for _, ch := range uc.channels {
|
||||
if ch.complete {
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.prefix(),
|
||||
Command: "JOIN",
|
||||
Params: []string{dc.marshalChannel(ch.conn, ch.Name)},
|
||||
})
|
||||
|
||||
forwardChannel(dc, ch)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user