3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-30 07:59:42 +01:00

AutoRejoin delay can now be overriden per-channel

This commit is contained in:
Pragmatic Software 2017-11-08 11:17:07 -08:00
parent 5c954dc43c
commit a119ed815f

View File

@ -42,7 +42,9 @@ sub rejoin_channel {
$self->{rejoins}->{$channel}->{rejoins} = 0 if not exists $self->{rejoins}->{$channel}; $self->{rejoins}->{$channel}->{rejoins} = 0 if not exists $self->{rejoins}->{$channel};
my $delay = $self->{pbot}->{registry}->get_array_value('autorejoin', 'rejoin_delay', $self->{rejoins}->{$channel}->{rejoins}); my $delay = $self->{pbot}->{registry}->get_array_value($channel, 'rejoin_delay', $self->{rejoins}->{$channel}->{rejoins});
$delay = $self->{pbot}->{registry}->get_array_value('autorejoin', 'rejoin_delay', $self->{rejoins}->{$channel}->{rejoins}) if not defined $delay;
$self->{pbot}->{interpreter}->add_botcmd_to_command_queue($channel, "join $channel", $delay); $self->{pbot}->{interpreter}->add_botcmd_to_command_queue($channel, "join $channel", $delay);
$delay = duration $delay; $delay = duration $delay;