From 9c5be37a94f0029f7bfc3b9df6c63a4c29579fc5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 4 Oct 2010 01:02:36 +0100 Subject: [PATCH] ypp-chatlog-alerter: working bell disablement --- ypp-chatlog-alerter | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ypp-chatlog-alerter b/ypp-chatlog-alerter index 275d7b5..05a9c20 100755 --- a/ypp-chatlog-alerter +++ b/ypp-chatlog-alerter @@ -282,7 +282,8 @@ proc message {pirate msg} { set ix [lsearch -exact $pirates $pirate] set now [clock seconds] - if {$ix<0 || [lindex $times $ix] < $now-$bell_again} { + if {$bell_again > -2 && + ($ix<0 || [lindex $times $ix] < $now-$bell_again)} { bell -nice } if {$ix < 0} { @@ -319,7 +320,7 @@ proc parseargs {} { if {![string compare $arg --test-tints]} { showtints } elseif {![string compare $arg --no-bell]} { - set bell_again -1 + set bell_again -2 } else { error "unknown option $arg" } -- 2.30.2