Avoid sending JOIN twice for the same channel
git-svn-id: file:///srv/svn/repo/suika/trunk@132 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
1577d3620c
commit
a29ce6fc7d
@ -11,12 +11,6 @@ func forwardChannel(dc *downstreamConn, ch *upstreamChannel) {
|
|||||||
|
|
||||||
downstreamName := dc.marshalChannel(ch.conn, ch.Name)
|
downstreamName := dc.marshalChannel(ch.conn, ch.Name)
|
||||||
|
|
||||||
dc.SendMessage(&irc.Message{
|
|
||||||
Prefix: dc.prefix(),
|
|
||||||
Command: "JOIN",
|
|
||||||
Params: []string{downstreamName},
|
|
||||||
})
|
|
||||||
|
|
||||||
if ch.Topic != "" {
|
if ch.Topic != "" {
|
||||||
dc.SendMessage(&irc.Message{
|
dc.SendMessage(&irc.Message{
|
||||||
Prefix: dc.srv.prefix(),
|
Prefix: dc.srv.prefix(),
|
||||||
|
@ -700,6 +700,12 @@ func (dc *downstreamConn) register() error {
|
|||||||
dc.forEachUpstream(func(uc *upstreamConn) {
|
dc.forEachUpstream(func(uc *upstreamConn) {
|
||||||
for _, ch := range uc.channels {
|
for _, ch := range uc.channels {
|
||||||
if ch.complete {
|
if ch.complete {
|
||||||
|
dc.SendMessage(&irc.Message{
|
||||||
|
Prefix: dc.prefix(),
|
||||||
|
Command: "JOIN",
|
||||||
|
Params: []string{dc.marshalChannel(ch.conn, ch.Name)},
|
||||||
|
})
|
||||||
|
|
||||||
forwardChannel(dc, ch)
|
forwardChannel(dc, ch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user