2012-10-16 20:21:51 -04:00
|
|
|
use strict;
|
|
|
|
use vars qw($VERSION %IRSSI);
|
|
|
|
|
|
|
|
use Irssi;
|
2012-10-19 01:18:18 -04:00
|
|
|
$VERSION = '0.0.3';
|
2012-10-16 20:21:51 -04:00
|
|
|
%IRSSI = (
|
2012-10-19 01:18:18 -04:00
|
|
|
authors => 'Chrelad',
|
2012-10-16 20:21:51 -04:00
|
|
|
contact => 'blah@blah.blah',
|
|
|
|
name => 'alert',
|
|
|
|
description => 'Play sounds for different events in IRSSI.',
|
2012-10-19 01:18:18 -04:00
|
|
|
url => 'http://google.com',
|
2012-10-16 20:21:51 -04:00
|
|
|
license => 'GNU General Public License',
|
|
|
|
changed => '$Date: 2007-02-07 12:00:00 +0100 (Thu, 7 Feb 2008) $'
|
|
|
|
);
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
2012-10-19 01:18:18 -04:00
|
|
|
# Created by Chrelad
|
2012-10-16 20:21:51 -04:00
|
|
|
# Feb 7, 2008
|
2012-10-19 01:18:18 -04:00
|
|
|
#modified by Storm Dragon
|
|
|
|
#Added private message sound and the ability to select sound method
|
2012-10-16 20:21:51 -04:00
|
|
|
#Sounds now play as a background process.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# The sound playing function for public message
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
sub pub_msg {
|
|
|
|
my ($server,$msg,$nick,$address,$target) = @_;
|
|
|
|
system("play -qn -V0 synth 0.09 tri E3:B3 &");
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# The sound playing function for private message
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
sub pri_msg {
|
|
|
|
my ($server,$msg,$nick,$address,$target) = @_;
|
2012-10-19 01:18:18 -04:00
|
|
|
system("play -qn -V0 synth pl G2 pl G3 pl B2 pl B3 pl D3 pl D4 pl G3 pl G4 pl D4 pl D4 pl G4 pl G4 delay 0 0 0.02 0.02 0.04 0.04 0.06 0.06 0.08 0.08 0.1 0.1 remix - phaser fade p 0 0.5 0.3 &");
|
2012-10-16 20:21:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# The sound playing function for nick mensioning message
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
sub nick_msg {
|
|
|
|
my ($server,$msg,$nick,$address,$target) = @_;
|
|
|
|
system("play -qn -V0 synth 0.5 tri A3:D3 tri D3:A3 remix - &");
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Irssi::signal_add_last / Irssi::command_bind
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
2012-10-19 01:18:18 -04:00
|
|
|
Irssi::signal_add("beep", "nick_msg");Irssi::signal_add_last("message public", "pub_msg");
|
2012-10-16 20:21:51 -04:00
|
|
|
Irssi::signal_add_last("message private", "pri_msg");
|
|
|
|
#- end
|
|
|
|
|