From 949dc1452593312a9d2fcd6b7656c26918e30548 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 1 Jul 2016 13:29:26 -0700 Subject: [PATCH] Command queue no longer delays commands relative to each other --- PBot/Interpreter.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index 195b8459..06c0452f 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -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; }