X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=blobdiff_plain;f=parse_banlist;h=9548f64e3fe72d666206666d2d9b1ef0423aa079;hp=c1a9a8faf89ff37409d74a9eb403f47e6d931243;hb=HEAD;hpb=15e6ee6761a563824f3467b8923f9849787242d0 diff --git a/parse_banlist b/parse_banlist index c1a9a8f..9548f64 100755 --- a/parse_banlist +++ b/parse_banlist @@ -87,17 +87,17 @@ my @bans_to_remove; while (<$bans_fh>) { # pull the ban and the times. - print {$bans_k_fh} $_ and next unless my ($channel, $banmask, $time) = - $_ =~ /(\#\w+)\:\s+ban\s+([\w\d\*\@\%\!\-\_\.]+)\s+\[by\s*.*?\,\s+(\d+)\s+secs/; - print {$bans_k_fh} $_ and next unless $time > $options{age}; + print {$bans_k_fh} "nomatch: $_" and next unless my ($channel, $banmask, $time) = + $_ =~ /(\#\w+)\:\s+ban\s+([^\s]+)\s+\[by\s*.*?\,\s+(\d+)\s+secs/; + print {$bans_k_fh} "time: $_" and next unless $time > $options{age}; # Ignore bans against specific users. if ($options{user}) { - print {$bans_k_fh} $_ and next if $banmask =~ /^\%?\w/ + print {$bans_k_fh} "user: $_" and next if $banmask =~ /^\%?\w/ } # Ignore wide bans if ($options{wide}) { - print {$bans_k_fh} $_ and next if $banmask =~ /\*\!.*?\@.*\*.*/; + print {$bans_k_fh} "wide: $_" and next if $banmask =~ /\*\!.*?\@.*\*.*/; } push @bans_to_remove, $banmask;