Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

brmd::IRC notify_door_open: Report only alert conditions

  • Loading branch information...
commit d617d799dd019e07b8c730efd7201b2c72416f14 1 parent 651aeff
@pasky pasky authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 brmd/brmd.pl
View
5 brmd/brmd.pl
@@ -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 );
}
Please sign in to comment.
Something went wrong with that request. Please try again.