Sridhar Dhanapalan <[EMAIL PROTECTED]> writes:

> I understand that there are plug-ins for irssi that perform a notification 
> service or run commands on certain cues. If irssi was running locally, I 
> could do all kinds of things with such a feature. If running remotely, 
> however, I believe that I am limited to notifications inside the irssi window 
> itself.

Not necessarily.

On your desktop,

ssh -R 7070:localhost:7070 remote-irssi.box.com

I found an irssi plugin that did something when it received an
hilighted message, I just stripped it down. I don't really understand
it. load this on the remote box running irssi.

!/usr/bin/perl -w
use IO::Socket;
use strict;
use Irssi;
use vars qw($VERSION);
$VERSION = "0.01";
Irssi::theme_register([
    'hilight_notice_loaded', '%R>>%n %_Scriptinfo:%_ Loaded $0 version $1 by 
$2.'
]);
sub hilight_notice {
    my ($dest, $text, $stripped) = @_;
    my $server = $dest->{server};
    my ($hilight) = Irssi::parse_special('$;');
    return if (!$server || !($dest->{level} & MSGLEVEL_HILIGHT) || 
($dest->{level} & 
(MSGLEVEL_MSGS|MSGLEVEL_NOTICES|MSGLEVEL_SNOTES|MSGLEVEL_CTCPS|MSGLEVEL_ACTIONS|MSGLEVEL_JOINS|MSGLEVEL_PARTS|MSGLEVEL_QUITS|MSGLEVEL_KICKS|MSGLEVEL_MODES|MSGLEVEL_TOPICS|MSGLEVEL_WALLOPS|MSGLEVEL_INVITES|MSGLEVEL_NICKS|MSGLEVEL_DCC|MSGLEVEL_DCCMSGS|MSGLEVEL_CLIENTNOTICE|MSGLEVEL_CLIENTERROR)));
    my $sock = new IO::Socket::INET (
        PeerAddr => 'localhost',
        PeerPort => '7070',
        Proto => 'tcp',
    );
    return unless $sock;
    print $sock "$stripped\n";
    close($sock);
}
Irssi::signal_add('print text', 'hilight_notice');
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'hilight_notice_loaded');

Then you need something on your desktop to open 7070 and do something with
the messages received

while : ; do nc -l -p 7070 ;sleep 1; done

I was going to use osd_cat to send the message to the screen, but it
looks broken at the moment, can't find the default font.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to