From 19f0b048f808001cac04ca27e9ed07e4f06dc007 Mon Sep 17 00:00:00 2001 From: jticket1024 Date: Wed, 9 Jan 2019 19:32:24 +0000 Subject: [PATCH] Try to fix hilight. --- sound.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound.pl b/sound.pl index 128f765..c80c514 100755 --- a/sound.pl +++ b/sound.pl @@ -233,15 +233,16 @@ 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 (!($server && $dest->{level} & (MSGLEVEL_HILIGHT) && $server->ischannel($dest->{target}) && $window->{refnum} != $dest->{window}->{refnum})) { return; } - if ($server && ! Irssi::settings_get_bool("sounds")) { - return;; - } else { + } if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) { if ($flood_protect) { my $sound_flood = Irssi::settings_get_int('sound_flood'); @@ -253,7 +254,6 @@ $window->{refnum} != $dest->{window}->{refnum})) { } } } -} #add settings and defaults Irssi::settings_add_bool("lookandfeel", "sounds", 1);