From: Ian Jackson Date: Mon, 4 Oct 2010 00:02:36 +0000 (+0100) Subject: ypp-chatlog-alerter: working bell disablement X-Git-Tag: 6.7.0~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=9c5be37a94f0029f7bfc3b9df6c63a4c29579fc5 ypp-chatlog-alerter: working bell disablement --- 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" }