rendered paste bodyuse Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "0.0.1";
%IRSSI = (
authors => 'net-cat <thevirtualcat@gmail.com>'
name => 'suppress_away',
description => 'Suppress activity notification for public away.',
license => 'GPL v2',
url => 'none',
);
Irssi::theme_register([
'action_public_channel', '{pubaction $0}$1'
]);
sub sig_action
{
my ($server, $msg, $nick, $address, $target) = @_;
if ( $msg =~ /is (back|away|gone)/ )
{
$server->printformat($target, MSGLEVEL_PUBLIC | MSGLEVEL_ACTIONS | MSGLEVEL_NO_ACT, 'action_public_channel', $nick, $msg);
Irssi::signal_stop();
}
}
Irssi::signal_add_last('message irc action', 'sig_action');