mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 20:42:38 +01:00
IRC.pm: minor syntax clean-up
This commit is contained in:
parent
d395fd41af
commit
8f365d8eeb
23
PBot/IRC.pm
23
PBot/IRC.pm
@ -137,23 +137,22 @@ sub do_one_loop {
|
||||
$scheduledevent = $self->schedulequeue->dequeue();
|
||||
$scheduledevent->content->{coderef}->(@{$scheduledevent->content->{args}});
|
||||
}
|
||||
if (!$self->schedulequeue->is_empty() && $nexttimer && $self->schedulequeue->head->time < $nexttimer) { $nexttimer = $self->schedulequeue->head->time; }
|
||||
|
||||
if (!$self->schedulequeue->is_empty() && $nexttimer && $self->schedulequeue->head->time < $nexttimer) {
|
||||
$nexttimer = $self->schedulequeue->head->time;
|
||||
}
|
||||
}
|
||||
|
||||
# Block until input arrives, then hand the filehandle over to the
|
||||
# user-supplied coderef. Look! It's a freezer full of government cheese!
|
||||
|
||||
if ($nexttimer) { $timeout = $nexttimer - $time < $self->{_timeout} ? $nexttimer - $time : $self->{_timeout}; }
|
||||
else { $timeout = $self->{_timeout}; }
|
||||
foreach $ev (
|
||||
IO::Select->select(
|
||||
$self->{_read},
|
||||
$self->{_write},
|
||||
$self->{_error},
|
||||
$timeout
|
||||
)
|
||||
)
|
||||
{
|
||||
if ($nexttimer) {
|
||||
$timeout = $nexttimer - $time < $self->{_timeout} ? $nexttimer - $time : $self->{_timeout};
|
||||
} else {
|
||||
$timeout = $self->{_timeout};
|
||||
}
|
||||
|
||||
foreach $ev (IO::Select->select($self->{_read}, $self->{_write}, $self->{_error}, $timeout)) {
|
||||
foreach $sock (@{$ev}) {
|
||||
my $conn = $self->{_connhash}->{$sock};
|
||||
$conn or next;
|
||||
|
Loading…
Reference in New Issue
Block a user