{
my $pkg = shift;
my $class = ref $pkg || $pkg;
- my $self = bless{@_}, $class;
+ my $self = bless{}, $class;
while (@_) {
my $key = shift;
my $val = shift;
DXXml::Ping::add($main::me, $dxchan->call);
$dxchan->{nopings} -= 1;
$dxchan->{lastping} = $t;
- $dxchan->{lastping} += $dxchan->{pingint} / 2 unless @{$dxchan->{pingtime}};
}
}
}
$dxchan->send($self->toxml);
} elsif ($dxchan->is_node) {
my $ref = $self->topcxx($dxchan);
- if (ref $ref) {
- for (@$ref) {
- $dxchan->send($_);
- }
- } else {
- $dxchan->send($ref);
- }
+ $dxchan->send($ref);
} else {
my $ref = $self->tocmd($dxchan);
- if (ref $ref) {
- for (@$ref) {
- $dxchan->send($_);
- }
- } else {
- $dxchan->send($ref);
- }
+ $dxchan->send($ref);
}
}