lastmsgpoll => '0,Last Msg Poll,atime',
inscript => '9,In a script,yesno',
handle_xml => '9,Handles XML,yesno',
- do_pc92 => '9,Handles PC92,yesno',
- do_pc93 => '9,Handles PC93,yesno',
+ do_pc9x => '9,Handles PC9x,yesno',
inqueue => '9,Input Queue,parray',
);
$main::me->{registered} = 1;
$main::me->{version} = $main::version;
$main::me->{build} = $main::build;
- $main::me->{do_pc92} = 1;
- $main::me->{via_pc92} = 1;
+ $main::me->{do_pc9x} = 1;
}
#
dbg('DXProt::send_local_config') if isdbg('trace');
# send our nodes
- if ($self->{do_pc92}) {
+ if ($self->{do_pc9x}) {
$self->send_pc92_config;
} else {
my $node;
if ($with_pc92_nodes) {
# send out the configuration of all the directly connected PC92 nodes with current configuration
# but with the dates that the last config came in with.
- @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} && $_->{do_pc92} } DXChannel::get_all_nodes();
+ @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} && $_->{do_pc9x} } DXChannel::get_all_nodes();
dbg("ROUTE: pc92 dxchan: " . join(',', map{$_->{call}} @dxchan)) if isdbg('routelow');
@localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan;
dbg("ROUTE: pc92 localnodes: " . join(',', map{$_->{call}} @localnodes)) if isdbg('routelow');
# send the configuration of all the directly connected 'external' nodes that don't handle PC92
# out with the 'external' marker on the first node.
- @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} && !$_->{do_pc92} } DXChannel::get_all_nodes();
+ @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} && !$_->{do_pc9x} } DXChannel::get_all_nodes();
dbg("ROUTE: non pc92 dxchan: " . join(',', map{$_->{call}} @dxchan)) if isdbg('routelow');
@localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan;
dbg("ROUTE: non pc92 localnodes: " . join(',', map{$_->{call}} @localnodes)) if isdbg('routelow');
sub time_out_pc92_routes
{
- my @nodes = grep {$_->call ne $main::mycall && ($_->do_pc92 || $_->via_pc92)} Route::Node::get_all();
+ my @nodes = grep {$_->call ne $main::mycall && ($_->do_pc9x || $_->via_pc92)} Route::Node::get_all();
my @rdel;
foreach my $n (@nodes) {
my $o = $n->dec_obs;
{
my ($self, $from, $to, $via, $line, $origin) = @_;
- if ($self->{do_pc93}) {
+ if ($self->{do_pc9x}) {
$self->send(pc93($to, $from, $via, $line));
} else {
$self->send(pc10($from, $to, $via, $line, $origin));
next if $dxchan == $self;
next if $dxchan == $main::me;
next unless $dxchan->isa('DXProt');
- next if $dxchan->{do_pc92};
+ next if $dxchan->{do_pc9x};
next if ($generate == \&pc16 || $generate==\&pc17) && !$dxchan->user->wantsendpc16;
$dxchan->send_route($origin, $generate, @_);
{
my $self = shift;
- return unless $self->{do_pc92};
+ return unless $self->{do_pc9x};
my $origin = shift;
my $generate = shift;
foreach $dxchan (@dxchan) {
next if $dxchan == $self || $dxchan == $main::me;
next if $origin eq $dxchan->{call}; # don't route some from this call back again.
- next unless $dxchan->{do_pc92};
+ next unless $dxchan->{do_pc9x};
next unless $dxchan->isa('DXProt');
$dxchan->send($line);
$self->sort('S');
}
$self->{handle_xml}++ if DXXml::available() && $_[1] =~ /\bxml/;
- my ($pc9x) = $_[1] =~ /\bpc9\[(\d+)\]/;
- if (defined $pc9x) {
- $self->{do_pc92}++ if $pc9x =~ /2/;
- $self->{do_pc93}++ if $pc9x =~ /3/;
+ if ($_[1] =~ /\bpc9x/) {
+ $self->{do_pc9x}++;
}
} else {
$self->version(50.0);
$self->broadcast_route_pc9x($main::mycall, undef, $line, 0);
# if this is an external node then send out the external config
- unless ($self->{do_pc92}) {
+ unless ($self->{do_pc9x}) {
$line = gen_my_pc92_config(Route::Node::get($self->{call}));
$self->broadcast_route_pc9x($main::mycall, undef, $line, 0);
}
my $line = shift;
my $origin = shift;
- if ($self->{do_pc92} && $self->{state} ne 'init92') {
+ if ($self->{do_pc9x} && $self->{state} ne 'init92') {
dbg("PCPROT: disconnecting because login call not sent in any pc92") if isdbg('chanerr');
$self->send("**** You logged in with $self->{call} but that is NOT your \$mycall");
$self->disconnect;
my $line = shift;
my $origin = shift;
- if ($self->{do_pc92}) {
+ if ($self->{do_pc9x}) {
if ($self->{state} ne 'init92') {
dbg("PCPROT: disconnecting because login call not sent in any pc92") if isdbg('chanerr');
$self->send("**** You logged in with $self->{call} but that is NOT your \$mycall");
if ($ref->isa('Route::Node') || $ref->isa('DXProt')) {
$flag |= 4;
my $dxchan = DXChannel::get($call);
- $flag |= 2 if $call ne $main::mycall && $dxchan && !$dxchan->{do_pc92};
+ $flag |= 2 if $call ne $main::mycall && $dxchan && !$dxchan->{do_pc9x};
if ($ext) {
if ($ref->version) {
my $version = $ref->version || 1.0;
my (@radd, @rdel);
- $self->{do_pc92} ||= 1;
+ $self->{do_pc9x} ||= 1;
my $pcall = $_[1];
unless ($pcall) {
my $oparent = $parent;
$parent->lastid->{92} = $t;
- $parent->do_pc92(1);
+ $parent->do_pc9x(1);
$parent->via_pc92(1);
if (@ent) {
my $line = shift;
my $origin = shift;
- $self->{do_pc93} ||= 1;
+ $self->{do_pc9x} ||= 1;
my $pcall = $_[1];
unless (is_callsign($pcall)) {
if (is_callsign($to)) {
# local talks
- my $dxchan = DXChannel::get($main::myalias) if $to eq $main::mycall;
+ my $dxchan;
+ $dxchan = DXChannel::get($main::myalias) if $to eq $main::mycall;
$dxchan = DXChannel::get($to) unless $dxchan;
if ($dxchan && $dxchan->is_user) {
$dxchan->talk($from, $to, $via, $text);
if ($ref) {
my @dxchan = $ref->alldxchan;
for $dxchan (@dxchan) {
- if ($dxchan->{do_pc93}) {
+ if ($dxchan->{do_pc9x}) {
$dxchan->send($line);
} else {
$dxchan->talk($from, $to, $via, $text);
# Request init string
sub pc18
{
- my $flags = " pc9[23]";
+ my $flags = " pc9x";
$flags .= " xml" if DXXml::available();
return "PC18^DXSpider Version: $main::version Build: $main::build$flags^$DXProt::myprot_version^";
}
handle_xml => '0,Using XML,yesno',
lastmsg => '0,Last Route Msg,atime',
lastid => '0,Last Route MsgID',
- do_pc92 => '0,Uses pc92,yesno',
+ do_pc9x => '0,Uses pc9x,yesno',
via_pc92 => '0,Came in via pc92,yesno',
obscount => '0,Obscount',
);
use DXDebug;
use DXChannel;
+use DXUtil;
use Prefix;
use strict;
use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
use vars qw(%list %valid $default);
+($VERSION, $BRANCH) = dxver(q$Revision$);
+
%list = ();
$default = 99; # the number of hops to use if we don't know
%valid = (
# put in a DXCluster node for us here so we can add users and take them away
$routeroot = Route::Node->new($mycall, $version*100+5300, Route::here($main::me->here)|Route::conf($main::me->conf));
-$routeroot->do_pc92(1);
+$routeroot->do_pc9x(1);
$routeroot->via_pc92(1);
# make sure that there is a routing OUTPUT node default file