]> git.madduck.net Git - code/irssi/scripts-bc-bd.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

simplify level assignment
authormartin f. krafft <madduck@madduck.net>
Wed, 27 May 2009 08:48:56 +0000 (10:48 +0200)
committermartin f. krafft <madduck@madduck.net>
Wed, 27 May 2009 08:49:00 +0000 (10:49 +0200)
Signed-off-by: martin f. krafft <madduck@madduck.net>
chanact.pl

index 3d44b94b68fc4aad96bdfebc9345ce6238c9b077..44b071af02d874d7e0732a7b90a90b3f05b1ba9a 100644 (file)
@@ -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);