aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2018-12-08 23:05:55 +1300
committerDavid Phillips <david@yeah.nah.nz>2018-12-08 23:05:55 +1300
commit2ad7b318a64161d80f8340c2e83c0ba3e1c52e43 (patch)
tree633197cf1444359f89be8192d7cd0ec870877c21
parent3292180b7f14f69fbc1ff70c5a5b426632a089a0 (diff)
downloadidalius-2ad7b318a64161d80f8340c2e83c0ba3e1c52e43.tar.xz
Allow traditional wildcards (and regex, accidentally) in ignores
-rwxr-xr-xidalius.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/idalius.pl b/idalius.pl
index 608c1d0..46e02c4 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -180,7 +180,14 @@ sub strike_add {
sub should_ignore {
my ($who) = @_;
- return grep {$_ eq $who} @{$config->{_}->{ignore}};
+ for my $mask (@{$config->{_}->{ignore}}) {
+ my $expr = $mask;
+ $expr =~ s/\*/.*/g;
+ if ($who =~ /^$expr$/) {
+ return 1;
+ }
+ }
+ return;
}
sub reconnect {