Send channel info to downstream on registration
This commit is contained in:
parent
3b0639bacc
commit
ec658e3d39
@ -197,6 +197,20 @@ func (c *downstreamConn) register() error {
|
||||
Params: []string{c.nick, "No MOTD"},
|
||||
})
|
||||
|
||||
c.srv.lock.Lock()
|
||||
for _, uc := range c.srv.upstreamConns {
|
||||
// TODO: fix races accessing upstream connection data
|
||||
if !uc.registered {
|
||||
continue
|
||||
}
|
||||
for _, ch := range uc.channels {
|
||||
if ch.complete {
|
||||
forwardChannel(c, ch)
|
||||
}
|
||||
}
|
||||
}
|
||||
c.srv.lock.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user