* clients: remove WHOIS info for manually-added clients

This commit is contained in:
Simon Zolin
2020-01-09 16:42:38 +03:00
parent 688a5d84c8
commit 87bcb67f8f
3 changed files with 2 additions and 21 deletions

View File

@@ -32,7 +32,6 @@ type Client struct {
SafeSearchEnabled bool
SafeBrowsingEnabled bool
ParentalEnabled bool
WhoisInfo [][]string // [[key,value], ...]
UseOwnBlockedServices bool // false: use global settings
BlockedServices []string
@@ -366,17 +365,6 @@ func (clients *clientsContainer) Add(c Client) (bool, error) {
}
}
// remove auto-clients with the same IP address, keeping WHOIS info if possible
for _, id := range c.IDs {
ch, ok := clients.ipHost[id]
if ok {
if len(c.WhoisInfo) == 0 {
c.WhoisInfo = ch.WhoisInfo
}
delete(clients.ipHost, id)
}
}
// update Name index
clients.list[c.Name] = &c