mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-08-02 22:43:35 +02:00
brmd.pl: Fix multi-channel support
This commit is contained in:
parent
c217e24269
commit
1252fbfb8e
1 changed files with 4 additions and 4 deletions
|
@ -681,7 +681,7 @@ sub notify_update {
|
|||
my $msg = "[$comp] update: \002$status\002";
|
||||
$extra and $msg .= " $extra";
|
||||
$manual and $msg .= " ($manual manual override by $nick)";
|
||||
$irc->yield (privmsg => $channel => $msg );
|
||||
$irc->yield (privmsg => $_ => $msg ) for @channels;
|
||||
topic_update($irc);
|
||||
}
|
||||
|
||||
|
@ -689,14 +689,14 @@ sub notify_door_unauth {
|
|||
my ($sender) = $_[SENDER];
|
||||
my $irc = $_[HEAP]->{irc};
|
||||
my $msg = "[door] \002unauthorized access\002 denied!";
|
||||
$irc->yield (privmsg => $channel => $msg );
|
||||
$irc->yield (privmsg => $_ => $msg ) for @channels;
|
||||
}
|
||||
|
||||
sub notify_door_unlocked {
|
||||
my ($sender) = @_[SENDER, ARG0];
|
||||
my $irc = $_[HEAP]->{irc};
|
||||
my $msg = "[door] unlocked";
|
||||
$irc->yield (privmsg => $channel => $msg );
|
||||
$irc->yield (privmsg => $_ => $msg ) for @channels;
|
||||
}
|
||||
|
||||
sub notify_door_open {
|
||||
|
@ -705,7 +705,7 @@ sub notify_door_open {
|
|||
|
||||
my $irc = $_[HEAP]->{irc};
|
||||
my $msg = "[door] $newstate \002(alert: closed brmlab, door opened, not unlocked)";
|
||||
$irc->yield (privmsg => $channel => $msg );
|
||||
$irc->yield (privmsg => $_ => $msg ) for @channels;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue