From 596b9f613b12751a949f361da959d0e64ad5db21 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 27 May 2009 10:48:56 +0200 Subject: [PATCH] simplify level assignment Signed-off-by: martin f. krafft --- chanact.pl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/chanact.pl b/chanact.pl index 3d44b94..44b071a 100644 --- a/chanact.pl +++ b/chanact.pl @@ -257,13 +257,12 @@ sub remake() { $match_windowlist ||= grep { $_ eq '@QUERIES' } @windowlist; } - my $filter_level = Irssi::settings_get_int('chanact_filter'); - if ($match_windowlist) { - # window matches windowlist so use - # chanact_filter_windowlist_level to override - # chanact_filter - $filter_level = Irssi::settings_get_int('chanact_filter_windowlist_level'); - } + # choose filter_level according to whether the window is in + # the windowlist + my $filter_level = $match_windowlist + ? Irssi::settings_get_int('chanact_filter_windowlist_level') + : Irssi::settings_get_int('chanact_filter'); + # skip windows with data of level lower than the applicable # filter setting next if ($win->{data_level} < $filter_level); -- 2.39.5