]> jfr.im git - irc/ircd-hybrid/bopm.git/commitdiff
scan_positive only klines if ss->positive is true
authorstrtok <redacted>
Fri, 10 Jan 2003 19:33:36 +0000 (19:33 +0000)
committerstrtok <redacted>
Fri, 10 Jan 2003 19:33:36 +0000 (19:33 +0000)
src/dnsbl.c
src/scan.c

index 771c5b017fed60f72f5f835287ae0f4e25f936e9..1373972222ea496dd5430a8f62afe68cf3a593d6 100644 (file)
@@ -163,7 +163,7 @@ void dnsbl_result(struct firedns_result *res)
    if(fdns_errno == FDNS_ERR_NONE)
    {
       /* Only report it if no other scans have found positives yet. */
-      if(!ss->positive && (ss->manual_target == NULL))
+      if(ss->manual_target == NULL)
          scan_positive(ss);
       dnsbl_log_positive(ss, res->lookup, (unsigned char)res->text[3]);
    }
index ded1f66d707d22020c93e2234f673605038c4a57..d1fe92b3e55280707e44ef2c3af2d123826a2b75 100644 (file)
@@ -489,7 +489,9 @@ void scan_open_proxy(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *da
 
    if(ss->manual_target == NULL)
    {
+      /* kline and close scan */
       scan_positive(ss);
+
       /* Report to blacklist */
       dnsbl_report(ss);
 
@@ -727,9 +729,12 @@ char *scan_gettype(int protocol)
 void scan_positive(struct scan_struct *ss)
 {
    node_t *node;
-
    OPM_T *scanner;
 
+   /* If already a positive, don't kline/close again */
+   if(ss->positive)
+      return;
+
    /* Format KLINE and send to IRC server */
    scan_irckline(ss);