edit => '7,Edit Function',
registered => '9,Registered?,yesno',
prompt => '0,Required Prompt',
+ version => '1,Node Version',
+ build => '1,Node Build',
);
use vars qw($VERSION $BRANCH);
$main::me->{priv} = 9;
$main::me->{metric} = 0;
$main::me->{pingave} = 0;
-
+ $main::me->{version} = $main::version;
+ $main::me->{build} = $main::build;
+
# $Route::Node::me->adddxchan($main::me);
}
if ($pcno == 18) { # link request
$self->state('init');
+ # record the type and version offered
+ if ($field[1] =~ /DXSpider Version: (\d+\.\d+) Build: (\d+\.\d+)/) {
+ $self->version(53 + $1);
+ $self->user->version(53 + $1);
+ $self->build(0 + $2);
+ $self->user->build(0 + $2);
+ unless ($self->is_spider) {
+ $self->user->sort('S');
+ $self->user->put;
+ $self->sort('S');
+ }
+ } else {
+ $self->version(50.0);
+ $self->version($field[2] / 100) if $field[2] && $field[2] =~ /^\d+$/;
+ $self->user->version($self->version);
+ }
+
# first clear out any nodes on this dxchannel
my $parent = Route::Node::get($self->{call});
my @rout = $parent->del_nodes;
} else {
$tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 6);
}
-# my $st;
-# for (@{$tochan->{pingtime}}) {
-# $st += $_;
-# }
-# $tochan->{pingave} = $st / @{$tochan->{pingtime}};
$tochan->{nopings} = $nopings; # pump up the timer
}
}
# and are not themselves isolated, this to make sure that isolated nodes
# don't appear outside of this node
my @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} } DXChannel::get_all_nodes();
- @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan && !$self->user->wantpc90;
+ @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan;
my @intcalls = map { $_->nodes } @localnodes if @localnodes;
my $ref = Route::Node::get($self->{call});
my @rnodes = $ref->nodes;
my $sort = shift;
my @out;
my $dxchan;
- my $n = @_;
while (@_) {
- my $str = sprintf "PC90^%s^%X^%s%d", $node->call, $main::systime, $sort, $n-1 ;
- for (; @_ && length $str < 200;) {
+ my $str = '';
+ for (; @_ && length $str <= 230;) {
my $ref = shift;
- next if $ref == $main::me;
my $call = $ref->call;
my $flag = 0;
+
$flag += 1 if $ref->here;
$flag += 2 if $ref->conf;
if ($ref->is_node) {
my $ping = int($ref->pingave * 10);
$str .= "^N$flag$call,$ping";
+ my $v = $ref->build || $ref->version;
+ $str .= ",$v" if defined $v;
} else {
$str .= "^U$flag$call";
}
}
- $str .= sprintf "^%s^", get_hops(90);
- push @out, $str;
+ push @out, $str if $str;
}
+ my $n = @out;
+ my $h = get_hops(90);
+ @out = map { sprintf "PC90^%s^%X^%s%d%s^%s^", $node->call, $main::systime, $sort, --$n, $_, $h } @out;
return @out;
}
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
prompt => '0,Required Prompt',
+ version => '1,Version',
+ build => '1,Build',
);
no strict;