- To: Sridhar Dhanapalan <sridhar@xxxxxxxxxxxxxx>
- Subject: Re: [SLUG] Maintaining a constant IRC presence
- From: Michael Chesterton <chesty@xxxxxxxxxxxxxxx>
- Date: Sun, 03 Sep 2006 22:56:39 +1000
- Cc: SLUG list <slug@xxxxxxxxxxx>
- User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
Sridhar Dhanapalan <sridhar@xxxxxxxxxxxxxx> 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.