From fe2b2da851700f169b0490814497621fd326fdce Mon Sep 17 00:00:00 2001 From: jticket1024 Date: Mon, 14 Jan 2019 18:11:35 +0000 Subject: [PATCH] Removed flood from hilight. --- sound.pl | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sound.pl b/sound.pl index 9db4a75..978965e 100755 --- a/sound.pl +++ b/sound.pl @@ -233,27 +233,21 @@ sub hilight { my ($dest, $text, $stripped) = @_; my $server = $dest->{server}; my $window = Irssi::active_server(); - if ($server && ! Irssi::settings_get_bool("sounds")) { - return; - } else { - if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) { if (!($server && $dest->{level} & (MSGLEVEL_HILIGHT) && $server->ischannel($dest->{target}) && $window->{refnum} != $dest->{window}->{refnum})) { return; } - if ($flood_protect) { - my $sound_flood = Irssi::settings_get_int('sound_flood'); - $sound_flood = 1000 if $sound_flood < 0; - Irssi::timeout_remove($sound_tag); - $sound_tag = Irssi::timeout_add($sound_flood, 'sound_overflow_timeout', undef); + if ($server && ! Irssi::settings_get_bool("sounds")) { + return; + } else { + if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) { system($hilightcmd); - $flood_protect = 0; } } } -} + #add settings and defaults Irssi::settings_add_bool("lookandfeel", "sounds", 1);