From 88ef6ee0afbc0f16565deb44b56de8c6bf2ba3d9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 5 Apr 2020 15:15:42 +0200 Subject: [PATCH] Use Network.GetName in network status NOTICE messages --- user.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user.go b/user.go index db8319c..746ed72 100644 --- a/user.go +++ b/user.go @@ -239,7 +239,7 @@ func (u *user) run() { uc.updateAway() 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 case eventUpstreamDisconnected: @@ -259,7 +259,7 @@ func (u *user) run() { if uc.network.lastError == nil { 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: @@ -267,7 +267,7 @@ func (u *user) run() { if net.lastError == nil || net.lastError.Error() != e.err.Error() { 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 @@ -275,7 +275,7 @@ func (u *user) run() { uc := e.uc 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 case eventUpstreamMessage: