X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2FannounceEmail.pl;h=a864634338d6891b1a68da8da7229dc0924fb8a1;hb=0aecce55f2b1b5cbb7768a925b9af3bfd1458db3;hp=073e039a4013844d279b0d3a1f96bfbd576346c5;hpb=88c9cb9f6ed80dd31981b083593b1746695083b9;p=clearscm.git diff --git a/bin/announceEmail.pl b/bin/announceEmail.pl index 073e039..a864634 100755 --- a/bin/announceEmail.pl +++ b/bin/announceEmail.pl @@ -252,9 +252,7 @@ sub MonitorMail() { my $greeting = $greetings[int rand $#greetings]; my $msg = "$greeting from $from... $subject"; - $msg =~ s/\"/\\"/g; - - my $hour = (localtime)[2]; + my $hour = (localtime)[2]; # Only announce if after 6 Am. Note this will announce up until # midnight but that's ok. I want midnight to 6 Am as silent time. @@ -262,9 +260,9 @@ sub MonitorMail() { if ($hour >= 7) { $log->msg($logmsg); $log->dbug("Calling speak"); - speak $msg; + speak $msg, $log; } else { - $log->msg("$logmsg [silent]"); + $log->msg("$logmsg [silent nighttime]"); } # if $unseen{$_} = 1; @@ -274,7 +272,7 @@ sub MonitorMail() { my $startTime = time; # Re-establish callback - $log->msg("Calling IMAP->idle"); + $log->dbug("Calling IMAP->idle"); eval { $IMAP->idle(\&MonitorMail, $opts{timeout}) };