mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Command queue no longer delays commands relative to each other
This commit is contained in:
parent
b03a4b68e6
commit
949dc14525
@ -394,12 +394,7 @@ sub process_output_queue {
|
||||
sub add_to_command_queue {
|
||||
my ($self, $channel, $command, $delay) = @_;
|
||||
|
||||
if (exists $self->{command_queue}->{$channel}) {
|
||||
my $last_when = $self->{command_queue}->{$channel}->[-1]->{when};
|
||||
$command->{when} = $last_when + $delay;
|
||||
} else {
|
||||
$command->{when} = gettimeofday + $delay;
|
||||
}
|
||||
$command->{when} = gettimeofday + $delay;
|
||||
|
||||
push @{$self->{command_queue}->{$channel}}, $command;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user