diff --git a/PBot/EventQueue.pm b/PBot/EventQueue.pm index 32a60ac6..d65b1f3a 100644 --- a/PBot/EventQueue.pm +++ b/PBot/EventQueue.pm @@ -322,9 +322,9 @@ sub duration_until_next_event { return $self->{event_queue}->[0]->{timeout} - time; } -# invokes the next event, if ready, and then returns seconds until next event +# invokes the current events and then returns seconds until next upcoming event -sub do_next_event { +sub do_events { my ($self) = @_; # early-return if no events available diff --git a/PBot/PBot.pm b/PBot/PBot.pm index 39687864..857603ba 100644 --- a/PBot/PBot.pm +++ b/PBot/PBot.pm @@ -335,8 +335,8 @@ sub do_one_loop { # do an irc engine loop (select, eventqueues, etc) $self->{irc}->do_one_loop; - # check for an available PBot event (returns seconds until next event) - my $waitfor = $self->{event_queue}->do_next_event; + # invoke PBot events (returns seconds until next event) + my $waitfor = $self->{event_queue}->do_events; # tell irc select loop to sleep for this many seconds # (or until its own internal eventqueue has an event)