Changeset 69 for trunk/dnsbl/DNSBL.pm


Ignore:
Timestamp:
07/19/18 17:03:38 (6 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

  • Accumulated fixes and tweaks from production
  • Add FindBin to a couple of scripts to make them more portable; they no longer need to be run from the directory they're in, or have system-specific paths hardcoded in either "use lib" or a -I argument
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/DNSBL.pm

    r67 r69  
    184184        "WHERE b.block >>= ? ".
    185185        "GROUP BY b.block,b.level,b.listme,o.listme ORDER BY b.block");
    186   $sthmoron = $dbh->prepare("SELECT ip,s4list,white FROM iplist WHERE parent = ?");
     186  $sthmoron = $dbh->prepare("SELECT ip,s4list,exclude FROM iplist WHERE parent = ?");
    187187}
    188188
     
    217217        $sth = $dbh->prepare("INSERT INTO iplist (ip,parent,exclude) VALUES ".
    218218                "(?,(SELECT block FROM blocks WHERE block >> ? ORDER BY level DESC LIMIT 1),?)");
    219         $sth->execute($rep,$rep,$exclude) or die "couldn't add entry for $rep: ".$dbh->errstr."\n";
     219        $sth->execute($rep,$rep,($exclude ? 'y' : 'n')) or die "couldn't add entry for $rep: ".$dbh->errstr."\n";
    220220      } elsif ($rows == 1) {
    221221        $sth = $dbh->prepare("UPDATE iplist SET count=count+1,".
Note: See TracChangeset for help on using the changeset viewer.