From: IsaacG Date: Tue, 26 Oct 2010 00:33:04 +0000 (-0400) Subject: Ignore whitespace in the ack_sorts setting X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=439af029529c3dee3c91cd7930302f0f6b660452;p=irssi-scripts.irssi.org.git Ignore whitespace in the ack_sorts setting --- diff --git a/scripts/ack.pl b/scripts/ack.pl index aeb6540..e5091a6 100644 --- a/scripts/ack.pl +++ b/scripts/ack.pl @@ -135,7 +135,9 @@ sub cmd_ack { my @windows = grep { $_->{data_level} } Irssi::windows(); # Must have some activity. # The sort functions to use - for my $sort (split(/,/, Irssi::settings_get_str('ack_sorts'))) + my $ack_sorts = Irssi::settings_get_str('ack_sorts'); + $ack_sorts =~ s/ //g; + for my $sort (split(/,/, $ack_sorts)) { my $reverse = ($sort =~ /^-/) ? 1 : 0; # Reverse sort or not $sort = substr($sort, 1) if ($sort =~ /^[+-]/); # ltrim a leading + or -