mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-07 19:24:01 +02:00
brmd::IRC notify_door_open: Report only alert conditions
This commit is contained in:
parent
651aeffaf9
commit
d617d799dd
1 changed files with 3 additions and 2 deletions
|
@ -699,9 +699,10 @@ sub notify_door_unlocked {
|
|||
|
||||
sub notify_door_open {
|
||||
my ($sender, $newstate, $alert) = @_[SENDER, ARG0, ARG1];
|
||||
$alert or return;
|
||||
|
||||
my $irc = $_[HEAP]->{irc};
|
||||
my $msg = "[door] $newstate";
|
||||
$alert and $msg .= " \002(alert: closed brmlab, door opened, not unlocked)";
|
||||
my $msg = "[door] $newstate \002(alert: closed brmlab, door opened, not unlocked)";
|
||||
$irc->yield (privmsg => $channel => $msg );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue