Send NOTICE to downstream when upstream is disconnected
Closes: https://todo.sr.ht/~emersion/soju/76
This commit is contained in:
parent
061347f9f9
commit
dab91736db
6
user.go
6
user.go
@ -428,6 +428,12 @@ func (u *user) run() {
|
|||||||
|
|
||||||
u.downstreamConns = append(u.downstreamConns, dc)
|
u.downstreamConns = append(u.downstreamConns, dc)
|
||||||
|
|
||||||
|
dc.forEachNetwork(func(network *network) {
|
||||||
|
if network.lastError != nil {
|
||||||
|
sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", network.GetName(), network.lastError))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
u.forEachUpstream(func(uc *upstreamConn) {
|
u.forEachUpstream(func(uc *upstreamConn) {
|
||||||
uc.updateAway()
|
uc.updateAway()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user