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.
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f2e7065)
Added special windowlist keyword @QUERIES to match all query windows, so
that you can either promote queries to a different filter level by
window name, or altogether.
Signed-off-by: martin f. krafft <madduck@madduck.net>
Cc: 530588@bugs.debian.org
# * <string> : space-separated list of windows for which to use
# chanact_filter_windowlist_level instead of
# chanact_filter.
# * <string> : space-separated list of windows for which to use
# chanact_filter_windowlist_level instead of
# chanact_filter.
+# The special string @QUERIES matches all queries.
#
# /set chanact_filter_windowlist_level <int>
# like chanact_filter for windows in chanact_filter_windowlist. Defaults to
#
# /set chanact_filter_windowlist_level <int>
# like chanact_filter for windows in chanact_filter_windowlist. Defaults to
!ref($active) && next;
my $name = $win->get_active_name;
!ref($active) && next;
my $name = $win->get_active_name;
+ my $type = $active->{type};
+
+ # determine whether we have a match with the windowlist
+ my @windowlist = split ' ', $windowlist;
+ my $match_windowlist = grep { $_ eq $name } @windowlist;
+ if ($type eq 'QUERY') {
+ # if this is a query, also try to match @QUERIES
+ $match_windowlist ||= grep { $_ eq '@QUERIES' } @windowlist;
+ }
my $filter_level = Irssi::settings_get_int('chanact_filter');
my $filter_level = Irssi::settings_get_int('chanact_filter');
- if (grep { $_ eq $name } split ' ', $windowlist) {
- # window matches $windowlist, so use
+ 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');
# chanact_filter_windowlist_level to override
# chanact_filter
$filter_level = Irssi::settings_get_int('chanact_filter_windowlist_level');
# check if we should show the mode
$mode = "";
# check if we should show the mode
$mode = "";
- if ($active->{type} eq "CHANNEL") {
+ if ($type eq "CHANNEL") {
my $server = $win->{active_server};
!ref($server) && next;
my $server = $win->{active_server};
!ref($server) && next;
# 0.5.11
# - added chanact_filter_windowlist, which is a space-separated list of
# windows for which to use chanact_filter_windowlist_level instead of
# 0.5.11
# - added chanact_filter_windowlist, which is a space-separated list of
# windows for which to use chanact_filter_windowlist_level instead of
-# chanact_filter (madduck@madduck.net).
+# chanact_filter. You can use @QUERIES to match all queries
+# (madduck@madduck.net).
#
# 0.5.10
# - fixed irssi crash when using Irssi::print from within remake()
#
# 0.5.10
# - fixed irssi crash when using Irssi::print from within remake()