3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

join_channel() can now take a comma-separated list of channels and issue them as one IRC command

This commit is contained in:
Pragmatic Software 2015-07-28 17:47:22 -07:00
parent f6a99818f0
commit 9cf59888c0

View File

@ -179,10 +179,12 @@ sub mute_user_timed {
}
sub join_channel {
my ($self, $channel) = @_;
my ($self, $channels) = @_;
$self->{pbot}->{conn}->join($channels);
foreach my $channel (split /,/, $channels) {
$self->{pbot}->{event_dispatcher}->dispatch_event('pbot.join', { channel => $channel });
$self->{pbot}->{conn}->join($channel);
delete $self->{is_opped}->{$channel};
delete $self->{op_requested}->{$channel};
@ -193,6 +195,7 @@ sub join_channel {
$self->gain_ops($channel);
}
}
}
sub part_channel {
my ($self, $channel) = @_;