Removed flood from hilight.
This commit is contained in:
parent
3dc9658db4
commit
fe2b2da851
16
sound.pl
16
sound.pl
@ -233,28 +233,22 @@ sub hilight {
|
|||||||
my ($dest, $text, $stripped) = @_;
|
my ($dest, $text, $stripped) = @_;
|
||||||
my $server = $dest->{server};
|
my $server = $dest->{server};
|
||||||
my $window = Irssi::active_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 &&
|
if (!($server &&
|
||||||
$dest->{level} & (MSGLEVEL_HILIGHT) &&
|
$dest->{level} & (MSGLEVEL_HILIGHT) &&
|
||||||
$server->ischannel($dest->{target}) &&
|
$server->ischannel($dest->{target}) &&
|
||||||
$window->{refnum} != $dest->{window}->{refnum})) {
|
$window->{refnum} != $dest->{window}->{refnum})) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($flood_protect) {
|
if ($server && ! Irssi::settings_get_bool("sounds")) {
|
||||||
my $sound_flood = Irssi::settings_get_int('sound_flood');
|
return;
|
||||||
$sound_flood = 1000 if $sound_flood < 0;
|
} else {
|
||||||
Irssi::timeout_remove($sound_tag);
|
if (my $hilightcmd = Irssi::settings_get_str("hilight_sound_command")) {
|
||||||
$sound_tag = Irssi::timeout_add($sound_flood, 'sound_overflow_timeout', undef);
|
|
||||||
system($hilightcmd);
|
system($hilightcmd);
|
||||||
$flood_protect = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#add settings and defaults
|
#add settings and defaults
|
||||||
Irssi::settings_add_bool("lookandfeel", "sounds", 1);
|
Irssi::settings_add_bool("lookandfeel", "sounds", 1);
|
||||||
Irssi::settings_add_int("lookandfeel", "sound_flood", 250);
|
Irssi::settings_add_int("lookandfeel", "sound_flood", 250);
|
||||||
|
Loading…
Reference in New Issue
Block a user