+ whois: use "descr" or "netname" in case there's no "orgname"

This commit is contained in:
Simon Zolin
2019-09-23 20:41:14 +03:00
parent 875905ce8a
commit 95eeccde8f
2 changed files with 37 additions and 6 deletions

View File

@@ -287,12 +287,14 @@ func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
if ok {
c.WhoisInfo = info
log.Debug("Clients: set WHOIS info for client %s: %v", c.Name, c.WhoisInfo)
return
}
ch, ok := clients.ipHost[ip]
if ok {
ch.WhoisInfo = info
log.Debug("Clients: set WHOIS info for auto-client %s: %v", ch.Host, ch.WhoisInfo)
return
}
ch = ClientHost{