mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-12 04:52:37 +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 = $self->schedulequeue->dequeue();
|
||||||
$scheduledevent->content->{coderef}->(@{$scheduledevent->content->{args}});
|
$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
|
# Block until input arrives, then hand the filehandle over to the
|
||||||
# user-supplied coderef. Look! It's a freezer full of government cheese!
|
# user-supplied coderef. Look! It's a freezer full of government cheese!
|
||||||
|
|
||||||
if ($nexttimer) { $timeout = $nexttimer - $time < $self->{_timeout} ? $nexttimer - $time : $self->{_timeout}; }
|
if ($nexttimer) {
|
||||||
else { $timeout = $self->{_timeout}; }
|
$timeout = $nexttimer - $time < $self->{_timeout} ? $nexttimer - $time : $self->{_timeout};
|
||||||
foreach $ev (
|
} else {
|
||||||
IO::Select->select(
|
$timeout = $self->{_timeout};
|
||||||
$self->{_read},
|
}
|
||||||
$self->{_write},
|
|
||||||
$self->{_error},
|
foreach $ev (IO::Select->select($self->{_read}, $self->{_write}, $self->{_error}, $timeout)) {
|
||||||
$timeout
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
foreach $sock (@{$ev}) {
|
foreach $sock (@{$ev}) {
|
||||||
my $conn = $self->{_connhash}->{$sock};
|
my $conn = $self->{_connhash}->{$sock};
|
||||||
$conn or next;
|
$conn or next;
|
||||||
|
Loading…
Reference in New Issue
Block a user