diff options
| author | Alexander Færøy | 2014-05-31 13:10:46 +0200 | 
|---|---|---|
| committer | Alexander Færøy | 2014-05-31 13:10:46 +0200 | 
| commit | 2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1 (patch) | |
| tree | 1c5e6d817c88e67b46e216a50e0aef5428bf63df /scripts/showhilight.pl | |
| parent | 2d080422d79d1fd49d6c5528593ccaaff9bfc583 (diff) | |
| download | scripts.irssi.org-2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1.tar.bz2 | |
Import scripts from scripts.irssi.org
Diffstat (limited to 'scripts/showhilight.pl')
| -rw-r--r-- | scripts/showhilight.pl | 30 | 
1 files changed, 30 insertions, 0 deletions
| diff --git a/scripts/showhilight.pl b/scripts/showhilight.pl new file mode 100644 index 0000000..6ff00ad --- /dev/null +++ b/scripts/showhilight.pl @@ -0,0 +1,30 @@ +# Print hilighted messages with MSGLEVEL_PUBLIC  to active window  +# for irssi 0.7.99 by Pawe³ 'Styx' Chuchma³a based on hilightwin.pl by Timo Sirainen +use Irssi; +use vars qw($VERSION %IRSSI);  +$VERSION = "0.1"; +%IRSSI = ( +        authors         => "Pawe³ \'Styx\' Chuchma³a", +	contact         => "styx\@irc.pl", +	name            => "showhilight", +	description     => "Show hilight messages in active window", +	license         => "GNU GPLv2", +	changed         => "Fri Jun 28 11:09:42 CET 2002" +						 +); + +sub sig_printtext { +  my ($dest, $text, $stripped) = @_; + +  my $window = Irssi::active_win(); + +  if (($dest->{level} & MSGLEVEL_HILIGHT) && ($dest->{level} & MSGLEVEL_PUBLIC) &&  +       ($window->{refnum} != $dest->{window}->{refnum}) && ($dest->{level} & MSGLEVEL_NOHILIGHT) == 0) { + +    $text = $dest->{target}.":%K[".Irssi::settings_get_str(hilight_color).$dest->{window}->{refnum}."%K]:".$text; + +    $window->print($text, MSGLEVEL_CLIENTCRAP); +  } +} + +Irssi::signal_add('print text', 'sig_printtext'); | 
