+
+sub dec_pc59
+{
+ my $node = shift;
+ my $s = ref($node) ? shift : $node;
+ $node = undef;
+
+ my ($sort, $here, $callstring) = unpack "A A A*", $s;
+ my ($call) = $callstring =~ /^([A-Z0-9\-]+)/;
+ return unless is_callsign($call);
+ return unless $here =~ /^[0123]$/;
+ return unless $sort =~ /^[NUE]$/;
+ if ($sort eq 'E' || $sort eq 'N') {
+ $node = Route::Node::get($call) || Route::Node->new($call);
+ if ($callstring =~ /b([\d\.])/) {
+ $node->{build} = $1;
+ }
+ if ($callstring =~ /v([\d\.])/) {
+ $node->{version} = $1;
+ }
+ } elsif ($sort eq 'U') {
+ $node = Route::User::get($call) || Route::User->new($call);
+ }
+ $node->{flags} = $here;
+ $node->{lastseen} = $main::systime;
+ return $node;
+}
+