/usr/share/irssi/scripts/beepaway.pl is in irssi-scripts 20100512.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/perl
#
# by Simon 'corecode' Schuberty <corecode@corecode.ath.cx>
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "2003011501";
%IRSSI = (
authors => "Simon 'corecode' Schubert",
contact => "corecode\@corecode.ath.cx",
name => "beepaway",
description => "Only beep when you are away",
license => "BSD",
changed => "$VERSION",
);
use Irssi 20020324;
sub catch_away {
my $level;
my $server;
($server) = @_;
if ($server->{usermode_away}) {
$level = Irssi::settings_get_str("beep_away_msg_level")
} else {
$level = Irssi::settings_get_str("beep_back_msg_level")
}
# Irssi::print "%R>>%n setting levels ``$level''";
$server->command("/^set beep_msg_level ".$level);
}
Irssi::settings_add_str($IRSSI{name}, "beep_away_msg_level", "MSGS NOTICES DCC DCCMSGS HILIGHT");
Irssi::settings_add_str($IRSSI{name}, "beep_back_msg_level", "NONE");
Irssi::signal_add("away mode changed", "catch_away");
print CLIENTCRAP '%B>>%n '.$IRSSI{name}.' '.$VERSION.' (c) '.$IRSSI{authors}.' loaded';
|