From 6899e748c681bade3855e08a9951f78e87e0fe4e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 28 Apr 2020 16:27:53 +0200 Subject: [PATCH] Abbreviate net status service reply Don't print the nickname if it's the same as the downstream connection's. --- service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service.go b/service.go index fabec76..11d1bfb 100644 --- a/service.go +++ b/service.go @@ -246,7 +246,11 @@ func handleServiceNetworkStatus(dc *downstreamConn, params []string) error { var statuses []string var details string if uc := net.upstream(); uc != nil { - statuses = append(statuses, "connected as "+uc.nick) + if dc.nick != uc.nick { + statuses = append(statuses, "connected as "+uc.nick) + } else { + statuses = append(statuses, "connected") + } details = fmt.Sprintf("%v channels", len(uc.channels)) } else { statuses = append(statuses, "disconnected")