mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-11 16:52:26 +00:00
Add highlitwin
This commit is contained in:
33
irssi/.irssi/scripts/autorun/hilightwin.pl
Normal file
33
irssi/.irssi/scripts/autorun/hilightwin.pl
Normal file
@@ -0,0 +1,33 @@
|
||||
# Print hilighted messages & private messages to window named "hilight"
|
||||
# for irssi 0.7.99 by Timo Sirainen
|
||||
use Irssi;
|
||||
use vars qw($VERSION %IRSSI);
|
||||
$VERSION = "0.01";
|
||||
%IRSSI = (
|
||||
authors => "Timo \'cras\' Sirainen",
|
||||
contact => "tss\@iki.fi",
|
||||
name => "hilightwin",
|
||||
description => "Print hilighted messages & private messages to window named \"hilight\"",
|
||||
license => "Public Domain",
|
||||
url => "http://irssi.org/",
|
||||
changed => "2002-03-04T22:47+0100"
|
||||
);
|
||||
|
||||
sub sig_printtext {
|
||||
my ($dest, $text, $stripped) = @_;
|
||||
|
||||
if (($dest->{level} & (MSGLEVEL_HILIGHT|MSGLEVEL_MSGS)) &&
|
||||
($dest->{level} & MSGLEVEL_NOHILIGHT) == 0) {
|
||||
$window = Irssi::window_find_name('hilight');
|
||||
|
||||
if ($dest->{level} & MSGLEVEL_PUBLIC) {
|
||||
$text = $dest->{target}.": ".$text;
|
||||
}
|
||||
$window->print($text, MSGLEVEL_CLIENTCRAP) if ($window);
|
||||
}
|
||||
}
|
||||
|
||||
$window = Irssi::window_find_name('hilight');
|
||||
Irssi::print("Create a window named 'hilight'") if (!$window);
|
||||
|
||||
Irssi::signal_add('print text', 'sig_printtext');
|
||||
Reference in New Issue
Block a user