Use Network.GetName in network status NOTICE messages
This commit is contained in:
parent
e70bf9c42a
commit
88ef6ee0af
8
user.go
8
user.go
@ -239,7 +239,7 @@ func (u *user) run() {
|
|||||||
uc.updateAway()
|
uc.updateAway()
|
||||||
|
|
||||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||||
sendServiceNOTICE(dc, fmt.Sprintf("connected to %s", uc.network.Name))
|
sendServiceNOTICE(dc, fmt.Sprintf("connected to %s", uc.network.GetName()))
|
||||||
})
|
})
|
||||||
uc.network.lastError = nil
|
uc.network.lastError = nil
|
||||||
case eventUpstreamDisconnected:
|
case eventUpstreamDisconnected:
|
||||||
@ -259,7 +259,7 @@ func (u *user) run() {
|
|||||||
|
|
||||||
if uc.network.lastError == nil {
|
if uc.network.lastError == nil {
|
||||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||||
sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s", uc.network.Name))
|
sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s", uc.network.GetName()))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
case eventUpstreamConnectionError:
|
case eventUpstreamConnectionError:
|
||||||
@ -267,7 +267,7 @@ func (u *user) run() {
|
|||||||
|
|
||||||
if net.lastError == nil || net.lastError.Error() != e.err.Error() {
|
if net.lastError == nil || net.lastError.Error() != e.err.Error() {
|
||||||
net.forEachDownstream(func(dc *downstreamConn) {
|
net.forEachDownstream(func(dc *downstreamConn) {
|
||||||
sendServiceNOTICE(dc, fmt.Sprintf("failed connecting/registering to %s: %v", net.Name, e.err))
|
sendServiceNOTICE(dc, fmt.Sprintf("failed connecting/registering to %s: %v", net.GetName(), e.err))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
net.lastError = e.err
|
net.lastError = e.err
|
||||||
@ -275,7 +275,7 @@ func (u *user) run() {
|
|||||||
uc := e.uc
|
uc := e.uc
|
||||||
|
|
||||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||||
sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", uc.network.Name, e.err))
|
sendServiceNOTICE(dc, fmt.Sprintf("disconnected from %s: %v", uc.network.GetName(), e.err))
|
||||||
})
|
})
|
||||||
uc.network.lastError = e.err
|
uc.network.lastError = e.err
|
||||||
case eventUpstreamMessage:
|
case eventUpstreamMessage:
|
||||||
|
Loading…
Reference in New Issue
Block a user