mirror of https://git.keinpfusch.net/loweel/zabov
- killfile stats: incremented only when adding a new domain in BL
- Malformed lines stats: stats are reset at refresh; ignoring blank/comment lines
This commit is contained in:
parent
b6dfee64a6
commit
5e94032cd0
|
@ -26,11 +26,18 @@ func bWriteThread() {
|
|||
|
||||
for item := range bChannel {
|
||||
|
||||
alreadyInSomeDB := false
|
||||
|
||||
for _, config := range item.Kconfigs {
|
||||
if !alreadyInSomeDB {
|
||||
alreadyInSomeDB = domainInKillfile(item.Kdomain, config)
|
||||
}
|
||||
writeInKillfile(item.Kdomain, item.Ksource, config)
|
||||
}
|
||||
incrementStats("BL domains from "+item.Ksource, 1)
|
||||
incrementStats("TOTAL", 1)
|
||||
if !alreadyInSomeDB {
|
||||
incrementStats("BL domains from "+item.Ksource, 1)
|
||||
incrementStats("TOTAL", 1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ func DoubleIndexFilter(durl string, configs stringarray) error {
|
|||
|
||||
fmt.Println("DoubleIndexFilter: Retrieving HostFile from: ", durl)
|
||||
|
||||
// resets malformed HostLines for url
|
||||
setstatsvalue("Malformed HostLines "+durl, 0)
|
||||
|
||||
var err error
|
||||
|
||||
// Get the data
|
||||
|
@ -48,6 +51,9 @@ func DoubleIndexFilter(durl string, configs stringarray) error {
|
|||
|
||||
line := scanner.Text()
|
||||
|
||||
if len(line) == 0 || strings.TrimSpace(line)[0] == '#' {
|
||||
continue
|
||||
}
|
||||
h := strings.FieldsFunc(line, splitter)
|
||||
|
||||
if h == nil {
|
||||
|
|
|
@ -18,6 +18,9 @@ func SingleIndexFilter(durl string, configs stringarray) error {
|
|||
|
||||
fmt.Println("Retrieving DomainFile from: ", durl)
|
||||
|
||||
// resets malformed HostLines for url
|
||||
setstatsvalue("Malformed DomainLines "+durl, 0)
|
||||
|
||||
var err error
|
||||
|
||||
// Get the data
|
||||
|
@ -46,6 +49,9 @@ func SingleIndexFilter(durl string, configs stringarray) error {
|
|||
|
||||
line := scanner.Text()
|
||||
|
||||
if len(line) == 0 || strings.TrimSpace(line)[0] == '#' {
|
||||
continue
|
||||
}
|
||||
h := strings.FieldsFunc(line, splitter)
|
||||
|
||||
if h == nil {
|
||||
|
|
Loading…
Reference in New Issue