Abbreviate net status service reply

Don't print the nickname if it's the same as the downstream
connection's.
This commit is contained in:
Simon Ser 2020-04-28 16:27:53 +02:00
parent 7b35757bac
commit 6899e748c6
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -246,7 +246,11 @@ func handleServiceNetworkStatus(dc *downstreamConn, params []string) error {
var statuses []string
var details string
if uc := net.upstream(); uc != nil {
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")