Mercurial > dnsbl
diff src/dnsbl.cpp @ 46:66c66a6ee65f
changes for 3.2
author | carl |
---|---|
date | Fri, 09 Jul 2004 08:16:25 -0700 |
parents | 6b79046b18c2 |
children | 5ef10dc14457 |
line wrap: on
line diff
--- a/src/dnsbl.cpp Fri Jul 09 08:04:25 2004 -0700 +++ b/src/dnsbl.cpp Fri Jul 09 08:16:25 2004 -0700 @@ -906,11 +906,11 @@ if (dc.content_suffix) { fprintf(stdout, "\ncontent filtering enabled with %s %s\n", dc.content_suffix, dc.content_message); } - if (dc.host_limit) { - fprintf(stdout, "\ncontent filtering for host names enabled with limit %d %s\n", dc.host_limit, dc.host_limit_message); + if (dc.host_limit && !dc.host_random) { + fprintf(stdout, "\ncontent filtering for host names hard limit %d %s\n", dc.host_limit, dc.host_limit_message); } - if (dc.host_random) { - fprintf(stdout, "\nrandom selection of host names, host limit message is not used\n"); + if (dc.host_limit && dc.host_random) { + fprintf(stdout, "\ncontent filtering for host names soft limit %d\n", dc.host_limit); } if (dc.tag_limit) { fprintf(stdout, "\ncontent filtering for excessive html tags enabled with limit %d %s\n", dc.tag_limit, dc.tag_limit_message); @@ -1024,11 +1024,11 @@ } dc.config_files.push_back(fn); map<char*, int, ltstr> commands; - enum {dummy, tld, content, hostlimit, hostrandom, htmllimit, htmltag, dnsbl, dnsbll, envfrom, envto, include, includedcc}; + enum {dummy, tld, content, hostlimit, hostslimit, htmllimit, htmltag, dnsbl, dnsbll, envfrom, envto, include, includedcc}; commands["tld" ] = tld; commands["content" ] = content; commands["host_limit" ] = hostlimit; - commands["host_random"] = hostrandom; + commands["host_soft_limit"] = hostslimit; commands["html_limit" ] = htmllimit; commands["html_tag" ] = htmltag; commands["dnsbl" ] = dnsbl; @@ -1091,10 +1091,14 @@ *last = '\0'; // make it a null terminator dc.host_limit = atoi(limit); dc.host_limit_message = register_string(msg); + dc.host_random = false; processed = true; } break; - case hostrandom: { + case hostslimit: { + char *limit = next_token(delim); + if (!limit) break; // no integer limit + dc.host_limit = atoi(limit); dc.host_random = true; processed = true; } break;