- if ($censorpc) {
- my @bad;
- if (@bad = BadWords::check($pc->[5])) {
- dbg("PCPROT: Bad words: @bad, dropped") if isdbg('chanerr');
+
+ my $nossid = $pc->[6];
+ $nossid =~ s/-\d+$//;
+
+ my @spot = Spot::prepare($pc->[1], $pc->[2], $d, $pc->[5], $nossid, $pc->[7], $pc->[8]);
+
+ # check IP addresses
+ if (@$pc > 8 && is_ipaddr($pc->[8])) {
+ my $ip = $pc->[8];
+ $ip =~ s/,/:/g;
+ $ip =~ s/^::ffff://;
+ if (DXCIDR::find($ip)) {
+ dbg($line) if isdbg('nologchan');
+ dbg("PCPROT: $ip in badip list, dropped");
+ # sneakily put it into the dup list to prevent following PC11s also getting through :-)
+ Spot::dup(@spot[0..4,7]);