diff options
| author | Tyler Abair | 2016-01-26 17:14:23 -0500 |
|---|---|---|
| committer | Tyler Abair | 2016-01-26 17:14:23 -0500 |
| commit | 68cff155f150b1286b11f43e5267d19a524a0b7c (patch) | |
| tree | 3767fbcde81714384a9b096cac33588c0228ce9d /scripts | |
| parent | 56616c5798cee1960682b93883376f0e0657f62e (diff) | |
| download | scripts.irssi.org-68cff155f150b1286b11f43e5267d19a524a0b7c.tar.bz2 | |
let fnotify reconfig on the fly
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/fnotify.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/fnotify.pl b/scripts/fnotify.pl index 88bf935..83cc858 100644 --- a/scripts/fnotify.pl +++ b/scripts/fnotify.pl @@ -59,6 +59,12 @@ my %config; Irssi::settings_add_int('fnotify', 'fnotify_ignore_hilight' => -1); $config{'ignore_hilight'} = Irssi::settings_get_int('fnotify_ignore_hilight'); +Irssi::signal_add( + 'setup changed' => sub { + $config{'ignore_hilight'} = Irssi::settings_get_int('fnotify_ignore_hilight'); + } +); + # # catch private messages # @@ -75,7 +81,7 @@ sub priv_msg { sub hilight { my ($dest, $text, $stripped) = @_; my $ihl = $config{'ignore_hilight'}; - if ($dest->{level} & MSGLEVEL_HILIGHT && $dest->{hilight_priority} > $ihl) { + if ($dest->{level} & MSGLEVEL_HILIGHT && $dest->{hilight_priority} != $ihl) { my $server = $dest->{server}; my $network = $server->{tag}; filewrite($network . ' ' . $dest->{target} . ' ' . $stripped); |
