From e05f6f502d6aa215e4292a3cb83c06d3bbb3e995 Mon Sep 17 00:00:00 2001 From: Jeremiah Ticket Date: Wed, 24 Aug 2016 12:28:55 -0800 Subject: [PATCH] Added a sound for quits --- sound.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound.pl b/sound.pl index 94965ed..a34602c 100755 --- a/sound.pl +++ b/sound.pl @@ -6,7 +6,7 @@ $VERSION = '0.0.3'; %IRSSI = ( authors => 'Chrelad', contact => 'blah@blah.blah', - name => 'alert', + name => 'sound', description => 'Play sounds for different events in IRSSI.', url => 'http://google.com', license => 'GNU General Public License', @@ -35,6 +35,11 @@ sub part_msg { system("play -qnV0 synth tri 1800 tri 1500 delay 0 .12 fade h 0 .2 remix - &> /dev/null&"); } +sub quit_msg { +my ($server,$msg,$nick,$address,$target) = @_; +system("play -qnV0 synth tri 1000 tri 800 delay 0 .12 fade h 0 .2 remix - &. /dev/null&") +} + sub pub_msg { my ($server,$msg,$nick,$address,$target) = @_; system("play -qn -V0 synth 0.09 tri E3:B3 &"); @@ -66,7 +71,6 @@ Irssi::signal_add("beep", "nick_msg");Irssi::signal_add_last("message public", " Irssi::signal_add_last("message private", "pri_msg"); Irssi::signal_add_last("message hilight", "nick_msg"); Irssi::signal_add("event join", 'join_msg'); -# Irssi::signal_add("event quit", 'on_quit'); + Irssi::signal_add("event quit", 'quit_msg'); Irssi::signal_add("event part", 'part_msg'); #- end -