From: martin f. krafft Date: Tue, 26 May 2009 18:09:16 +0000 (+0200) Subject: Merge branch 'windowlist-filter' into int X-Git-Url: https://git.madduck.net/code/irssi/scripts-bc-bd.git/commitdiff_plain/a2216768e3b5ad42e86de97b6a2d931cb79978bd Merge branch 'windowlist-filter' into int Conflicts: chanact.pl --- a2216768e3b5ad42e86de97b6a2d931cb79978bd diff --cc chanact.pl index f1f69f1,3d44b94..cecd635 --- a/chanact.pl +++ b/chanact.pl @@@ -4,14 -4,14 +4,14 @@@ use Irssi::TextUI use vars qw($VERSION %IRSSI); - $VERSION = "0.5.10"; + $VERSION = "0.5.11"; %IRSSI = ( - authors => 'BC-bd, Veli', - contact => 'bd@bc-bd.org, veli@piipiip.net', - name => 'chanact', - description => 'Adds new powerful and customizable [Act: ...] item (chanelnames,modes,alias). Lets you give alias characters to windows so that you can select those with meta-', - license => 'GNU GPLv2 or later', - url => 'https://bc-bd.org/svn/repos/irssi/chanact' + authors => 'BC-bd, Veli', + contact => 'bd@bc-bd.org, veli@piipiip.net', + name => 'chanact', + description => 'Adds new powerful and customizable [Act: ...] item (chanelnames,modes,alias). Lets you give alias characters to windows so that you can select those with meta-', + license => 'GNU GPLv2 or later', + url => 'http://bc-bd.org/blog/irssi/' ); # Adds new powerful and customizable [Act: ...] item (chanelnames,modes,alias). @@@ -26,13 -26,14 +26,14 @@@ # Contributors ######### # -# veli@piipiip.net /window_alias code -# qrczak@knm.org.pl chanact_abbreviate_names -# qerub@home.se Extra chanact_show_mode and chanact_chop_status -# madduck@madduck.net Better channel aliasing (case-sensitive, cross-network) -# chanact_filter_windowlist +# veli@piipiip.net /window_alias code +# qrczak@knm.org.pl chanact_abbreviate_names +# qerub@home.se Extra chanact_show_mode and chanact_chop_status +# madduck@madduck.net Better channel aliasing (case-sensitive, cross-network) ++# chanact_filter_windowlist # Jan 'jast' Krueger , 2004-06-22 # Ivo Timmermans win->{hilight} patch -# +# ######### # USAGE ### @@@ -138,28 -139,40 +139,40 @@@ # * OFF : Don't move the windows automatically # # /set chanact_renumber_start -# * : Move the window to first available slot after this -# num when "chanact_autorenumber" is ON. +# * : Move the window to first available slot after this +# num when "chanact_autorenumber" is ON. # # /set chanact_remove_hash -# * ON : Remove &#+!= from channel names -# * OFF : Don't touch channel names +# * ON : Remove &#+!= from channel names +# * OFF : Don't touch channel names # # /set chanact_remove_prefix -# * : Regular expression used to remove from the -# beginning of the channel name. -# * example : -# To shorten a lot of debian channels: -# -# /set chanact_remove_prefix deb(ian.(devel-)?)? +# * : Regular expression used to remove from the +# beginning of the channel name. +# * example : +# To shorten a lot of debian channels: +# +# /set chanact_remove_prefix deb(ian.(devel-)?)? # # /set chanact_filter -# * 0 : show all channels -# * 1 : hide channels without activity -# * 2 : hide channels with only join/part/etc messages -# * 3 : hide channels with text messages -# * 4 : hide all channels (now why would you want to do that) +# * 0 : show all channels +# * 1 : hide channels without activity +# * 2 : hide channels with only join/part/etc messages +# * 3 : hide channels with text messages +# * 4 : hide all channels (now why would you want to do that) # + # /set chanact_filter_windowlist + # * : 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 + # like chanact_filter for windows in chanact_filter_windowlist. Defaults to + # chanact_filter<4 ? 4 : 2, making chanact_filter_windowlist a list of + # windows never to show if chanact_filter<4, and a list of windows to show + # when there is reasonable activity if all channels would be hidden. + # ######### # HINTS ######### @@@ -214,8 -227,9 +227,9 @@@ sub remake() my $abbrev = Irssi::settings_get_int('chanact_abbreviate_names'); my $remove_prefix = Irssi::settings_get_str('chanact_remove_prefix'); my $remove_hash = Irssi::settings_get_bool('chanact_remove_hash'); + my $windowlist = Irssi::settings_get_str('chanact_filter_windowlist'); - if (Irssi::settings_get_bool('chanact_sort_by_activity')) { + if (Irssi::settings_get_bool('chanact_sort_by_activity')) { @windows = sort { ($b->{last_line} <=> $a->{last_line}) } Irssi::windows; } else { @@@ -237,13 -271,13 +271,13 @@@ # (status) is an awfull long name, so make it short to 'S' # some people don't like it, so make it configurable if (Irssi::settings_get_bool('chanact_chop_status') - && $name eq "(status)") { + && $name eq "(status)") { $name = "S"; } - + # 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; @@@ -463,27 -498,33 +498,33 @@@ Irssi::signal_add_last('window refnum c ### # # Changelog - # + # + # 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. You can use @QUERIES to match all queries + # (madduck@madduck.net). + # # 0.5.10 -# - fixed irssi crash when using Irssi::print from within remake() -# - added option to filter out some data levels, based on a patch by -# Juergen Jung , see -# https://bc-bd.org/trac/irssi/ticket/15 -# + retired chanact_show_all in favour of chanact_filter +# - fixed irssi crash when using Irssi::print from within remake() +# - added option to filter out some data levels, based on a patch by +# Juergen Jung , see +# https://bc-bd.org/trac/irssi/ticket/15 +# + retired chanact_show_all in favour of chanact_filter # # 0.5.9 -# - changes by stefan voelkel -# + sort channels by activity, see -# https://bc-bd.org/trac/irssi/ticket/5, based on a patch by jan -# krueger -# + fixed chrash on /exec -interactive, see -# https://bc-bd.org/trac/irssi/ticket/7 +# - changes by stefan voelkel +# + sort channels by activity, see +# https://bc-bd.org/trac/irssi/ticket/5, based on a patch by jan +# krueger +# + fixed chrash on /exec -interactive, see +# https://bc-bd.org/trac/irssi/ticket/7 # -# - changes by Jan 'jast' Krueger , 2004-06-22 -# + updated documentation in script's comments +# - changes by Jan 'jast' Krueger , 2004-06-22 +# + updated documentation in script's comments # -# - changes by Ivo Timmermans -# + honor actcolor /hilight setting if present +# - changes by Ivo Timmermans +# + honor actcolor /hilight setting if present # # 0.5.8 # - made aliases case-sensitive and include network in channel names by madduck