Added macintalk_rate config option

This commit is contained in:
Matthew Connelly 2015-03-26 19:43:03 +00:00
parent 056aafa287
commit 26678fca4b
2 changed files with 5 additions and 1 deletions

View File

@ -139,7 +139,10 @@ sub trigger {
$file->remove() if defined $Conf->{monitor}->{$sender_mon}->{action}->{delete} and $Conf->{monitor}->{$sender_mon}->{action}->{delete} == 1;
}
sub notify {
macintalk_say(text=>$_[($_[0] eq $ME)? 1 : 0], voice=>(length $Conf->{general}->{notify}->{macintalk_voice}? $Conf->{general}->{notify}->{macintalk_voice} : "Daniel")) if $Conf->{general}->{notify}->{macintalk} == 1;
my %macintalk_args = (text => $_[($_[0] eq $ME)? 1 : 0],);
$macintalk_args{voice} = $Conf->{general}->{notify}->{macintalk_voice} if length $Conf->{general}->{notify}->{macintalk_voice};
$macintalk_args{rate} = $Conf->{general}->{notify}->{macintalk_rate} if $Conf->{general}->{notify}->{macintalk_rate} > 120;
macintalk_say(%macintalk_args) if $Conf->{general}->{notify}->{macintalk} == 1;
nc_notify(@_) if $Conf->{general}->{notify}->{osxnotify} == 1;
}
sub name {

View File

@ -60,4 +60,5 @@ general:
error: 0
macintalk: 1
macintalk_voice: Daniel
macintalk_rate: 190
osxnotify: 1