Skip to content

Commit

Permalink
brmd.pl: Fix multi-channel support
Browse files Browse the repository at this point in the history
  • Loading branch information
pasky committed Jun 9, 2012
1 parent c217e24 commit 1252fbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions brmd/brmd.pl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -681,22 +681,22 @@ sub notify_update {
my $msg = "[$comp] update: \002$status\002"; my $msg = "[$comp] update: \002$status\002";
$extra and $msg .= " $extra"; $extra and $msg .= " $extra";
$manual and $msg .= " ($manual manual override by $nick)"; $manual and $msg .= " ($manual manual override by $nick)";
$irc->yield (privmsg => $channel => $msg ); $irc->yield (privmsg => $_ => $msg ) for @channels;
topic_update($irc); topic_update($irc);
} }


sub notify_door_unauth { sub notify_door_unauth {
my ($sender) = $_[SENDER]; my ($sender) = $_[SENDER];
my $irc = $_[HEAP]->{irc}; my $irc = $_[HEAP]->{irc};
my $msg = "[door] \002unauthorized access\002 denied!"; my $msg = "[door] \002unauthorized access\002 denied!";
$irc->yield (privmsg => $channel => $msg ); $irc->yield (privmsg => $_ => $msg ) for @channels;
} }


sub notify_door_unlocked { sub notify_door_unlocked {
my ($sender) = @_[SENDER, ARG0]; my ($sender) = @_[SENDER, ARG0];
my $irc = $_[HEAP]->{irc}; my $irc = $_[HEAP]->{irc};
my $msg = "[door] unlocked"; my $msg = "[door] unlocked";
$irc->yield (privmsg => $channel => $msg ); $irc->yield (privmsg => $_ => $msg ) for @channels;
} }


sub notify_door_open { sub notify_door_open {
Expand All @@ -705,7 +705,7 @@ sub notify_door_open {


my $irc = $_[HEAP]->{irc}; my $irc = $_[HEAP]->{irc};
my $msg = "[door] $newstate \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 ); $irc->yield (privmsg => $_ => $msg ) for @channels;
} }


1; 1;
Expand Down

0 comments on commit 1252fbf

Please sign in to comment.