Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

brmd::IRC notify_door_open: Report only alert conditions

  • Loading branch information...
commit d617d799dd019e07b8c730efd7201b2c72416f14 1 parent 651aeff
Petr Baudis authored October 20, 2011

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  brmd/brmd.pl
5  brmd/brmd.pl
@@ -699,9 +699,10 @@ sub notify_door_unlocked {
699 699
 
700 700
 sub notify_door_open {
701 701
 	my ($sender, $newstate, $alert) = @_[SENDER, ARG0, ARG1];
  702
+	$alert or return;
  703
+
702 704
 	my $irc = $_[HEAP]->{irc};
703  
-	my $msg = "[door] $newstate";
704  
-	$alert and $msg .= " \002(alert: closed brmlab, door opened, not unlocked)";
  705
+	my $msg = "[door] $newstate \002(alert: closed brmlab, door opened, not unlocked)";
705 706
 	$irc->yield (privmsg => $channel => $msg );
706 707
 }
707 708
 

0 notes on commit d617d79

Please sign in to comment.
Something went wrong with that request. Please try again.