client.go | 6 ++++++ diff --git a/client.go b/client.go index 513e7871d2231177ad8abccffb396b421ff22788..cb66b565966605771581bea0cb4cfbf5b017212d 100644 --- a/client.go +++ b/client.go @@ -345,6 +345,7 @@ return } defer f.Close() var ranges []iplist.Range + uniqStrs := make(map[string]string) scanner := bufio.NewScanner(f) for scanner.Scan() { r, ok, lineErr := iplist.ParseBlocklistP2PLine(scanner.Bytes()) @@ -354,6 +355,11 @@ return } if !ok { continue + } + if s, ok := uniqStrs[r.Description]; ok { + r.Description = s + } else { + uniqStrs[r.Description] = r.Description } ranges = append(ranges, r) }