Once again, attempt to fix hilight.
This commit is contained in:
parent
15165e32b5
commit
5ba1e55fd6
12
sound.pl
12
sound.pl
@ -236,18 +236,18 @@ my $window = Irssi::active_server();
|
|||||||
if ($server && ! Irssi::settings_get_bool("sounds")) {
|
if ($server && ! Irssi::settings_get_bool("sounds")) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (!($server &&
|
|
||||||
$dest->{level} & (MSGLEVEL_HILIGHT) &&
|
|
||||||
$server->ischannel($dest->{target}) &&
|
|
||||||
$window->{refnum} != $dest->{window}->{refnum})) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) {
|
if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) {
|
||||||
if ($flood_protect) {
|
if ($flood_protect) {
|
||||||
my $sound_flood = Irssi::settings_get_int('sound_flood');
|
my $sound_flood = Irssi::settings_get_int('sound_flood');
|
||||||
$sound_flood = 1000 if $sound_flood < 0;
|
$sound_flood = 1000 if $sound_flood < 0;
|
||||||
Irssi::timeout_remove($sound_tag);
|
Irssi::timeout_remove($sound_tag);
|
||||||
$sound_tag = Irssi::timeout_add($sound_flood, 'sound_overflow_timeout', undef);
|
$sound_tag = Irssi::timeout_add($sound_flood, 'sound_overflow_timeout', undef);
|
||||||
|
if (!($server &&
|
||||||
|
$dest->{level} & (MSGLEVEL_HILIGHT) &&
|
||||||
|
$server->ischannel($dest->{target}) &&
|
||||||
|
$window->{refnum} != $dest->{window}->{refnum})) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
system($hilightcmd);
|
system($hilightcmd);
|
||||||
$flood_protect = 0;
|
$flood_protect = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user