rendered paste body#!/usr/bin/irssi
#
# irssi beep replace script (tested with v0.8.4.CVS (20020413-1428))
# (C) 2002 Ge0rG@IRCnet (Georg Lukas <georg@op-co.de>)
# inspired and tested by Macrotron@IRCnet (macrotron@president.eu.org)
# added beep_flood to irssi settings: beep_cmd will be run not more often
# then every $beep_flood milliseconds
$VERSION = "0.8";
%IRSSI = (
authors => "Georg Lukas",
contact => "georg\@op-co.de",
name => "beep_beep",
description => "runs arbitrary command instead of system beep, includes flood protection",
license => "Public Domain",
url => "none",
);
use Irssi;
sub beep_beep() {
my $beep_cmd = Irssi::settings_get_str("beep_cmd");
if ($beep_cmd) {
system($beep_cmd);
}
Irssi::signal_stop();
}
Irssi::settings_add_str("lookandfeel", "beep_cmd", "aplay -q -D plug:dmix /usr/share/sounds/KDE_Pop.wav 1>/dev/null 2>/dev/null &");
Irssi::settings_add_int("lookandfeel", "beep_flood", 250);
Irssi::signal_add("beep", "beep_beep");