brmd::IRC notify_door_open: Report only alert conditions

This commit is contained in:
Petr Baudis 2011-10-20 14:21:10 +02:00
parent 651aeffaf9
commit d617d799dd

View file

@ -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 );
}