diff options
| author | ailin-nemui | 2017-02-23 20:01:14 +0100 | 
|---|---|---|
| committer | GitHub | 2017-02-23 20:01:14 +0100 | 
| commit | ce3fc7f78032e872a58fb7badff241f6bc94a0ae (patch) | |
| tree | e0eb0f8b0f2891f6ef887a858bef171c737c3d04 | |
| parent | 20a83aac25140477ec118defac1c9718ed2a05f7 (diff) | |
| parent | 85e74f61af85356830030596e9ff77faf2f7c05f (diff) | |
| download | scripts.irssi.org-ce3fc7f78032e872a58fb7badff241f6bc94a0ae.tar.bz2 | |
Merge pull request #355 from madduck/ctrlact-fix_cmd_query_netmatch
[ctrlact] Fix network matching for query subcommand
| -rw-r--r-- | scripts/ctrlact.pl | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/scripts/ctrlact.pl b/scripts/ctrlact.pl index 534b00a..da39804 100644 --- a/scripts/ctrlact.pl +++ b/scripts/ctrlact.pl @@ -111,7 +111,7 @@ use Carp qw( croak );  use Irssi;  use Text::ParseWords; -our $VERSION = '1.1'; +our $VERSION = '1.2';  our %IRSSI = (      authors     => 'martin f. krafft', @@ -119,7 +119,7 @@ our %IRSSI = (      name        => 'ctrlact',      description => 'allows per-channel control over activity indication',      license     => 'MIT', -    changed     => '2017-02-15' +    changed     => '2017-02-24'  );  ### DEFAULTS AND SETTINGS ###################################################### @@ -208,7 +208,8 @@ sub from_data_level {  sub walk_match_array {  	my ($name, $net, $type, @arr) = @_;  	foreach my $quadruplet (@arr) { -		my $netmatch = match($quadruplet->[0], $net); +		my $netmatch = $net eq '*' ? '(ignored)' +					: match($quadruplet->[0], $net);  		my $match = match($quadruplet->[1], $name);  		next unless $netmatch and $match; @@ -431,14 +432,14 @@ sub load_mappings {  	my $nrcols = 4;  	if ($version eq $VERSION) { -		# current version +		# current version, i.e. no special handling is required. If +		# previous versions require special handling, then massage the +		# data or do whatever is required in the following +		# elsif-clauses:  	}  	elsif ($version eq "1.0") {  		$nrcols = 3;  	} -	else { -		croak "Unsupported version found in $filename: $version" -	}  	my $linesplitter = '^\s*'.join('\s+', ('(\S+)') x $nrcols).'\s*$';  	my $l = 1;  	while (<$fh>) { | 
