brmd notify_door_unauth: Include cardid parameter

This commit is contained in:
Petr Baudis 2011-10-19 00:16:59 +02:00
parent bae8ecd1eb
commit fa974afcc9

View file

@ -178,8 +178,8 @@ sub serial_input {
} }
if ($brm =~ s/^CARD //) { if ($brm =~ s/^CARD //) {
print "from door: $input\n"; print "from door: $input\n";
if ($brm =~ /^UNKNOWN/) { if ($brm =~ s/^UNKNOWN //) {
$poe_kernel->post( $irc, 'notify_door_unauth' ); $poe_kernel->post($irc, 'notify_door_unauth', $brm);
} else { } else {
$poe_kernel->post( $irc, 'notify_door_unlocked', $brm ); $poe_kernel->post( $irc, 'notify_door_unlocked', $brm );
} }
@ -628,7 +628,7 @@ sub notify_update {
} }
sub notify_door_unauth { sub notify_door_unauth {
my ($sender) = $_[SENDER]; my ($sender, $cardid) = @_[SENDER, ARG0];
my $irc = $_[HEAP]->{irc}; my $irc = $_[HEAP]->{irc};
my $msg = "[door] unauthorized access denied!"; my $msg = "[door] unauthorized access denied!";
$irc->yield (privmsg => $channel => $msg ); $irc->yield (privmsg => $channel => $msg );