]> gb7djk.dxcluster.net Git - spider.git/commitdiff
refine cc pc18, set qrg granularity 1khz
authorDirk Koopman <djk@tobit.co.uk>
Wed, 29 Jan 2025 13:58:49 +0000 (13:58 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 29 Jan 2025 13:58:49 +0000 (13:58 +0000)
Changes
cmd/Commands_en.hlp
cmd/set/ccluster.pl [new file with mode: 0644]
perl/DXChannel.pm
perl/DXProtHandle.pm
perl/Messages
perl/Spot.pm

diff --git a/Changes b/Changes
index d0b453d12b2c58872a1550f07273edde0b2bbef8..51cac450e96f1b59545cc49c774aad26033174fe 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,9 @@
+28Jan25======================================================================
+1. Set default Spot qrg granularity to 1KHz (was 25KHz).
+2. Refine Incoming CCLuster connection handling. It is a requirement that a
+   node is either currently known as a node (probably automagickly marked as
+   dxspider previously by receiving PC92 K record) or doing it explicitly
+   with a 'set/ccluster' command. 
 27Jan25======================================================================
 1. Make SURE that spot dupe checks do not add yet more dupe (dupe) records
    to the dupe file. 
index 6d37efb96f459627dbe3daa385f0cef11c925253..09f6212cacf87c4ee705e5b3df3eff68e6a02059 100644 (file)
@@ -1752,6 +1752,8 @@ out of any node in this cluster.
 
 === 5^SET/CLX <call> [<call>..]^Make the callsign an CLX node
 
+=== 5^SET/CCLUSTER <call> [<call>..]^Make the callsign an CC Cluster node
+
 === 9^SET/DEBUG <name>^Add a debug level to the debug set
 === 9^UNSET/DEBUG <name>^Remove a debug level from the debug set
 You can choose to log several different levels.  The levels are
diff --git a/cmd/set/ccluster.pl b/cmd/set/ccluster.pl
new file mode 100644 (file)
index 0000000..fe9ea1a
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# set user type to 'L' for Lee's CCluster node
+#
+# Please note that this is only effective if the user is not on-line
+#
+# Copyright (c) 2025 - Dirk Koopman
+#
+#
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+my $user;
+my $create;
+
+return (1, $self->msg('e5')) if $self->priv < 5;
+
+foreach $call (@args) {
+       $call = uc $call;
+       if ($call eq $main::mycall) {
+               push @out, $self->msg('e11', $call);
+               next;
+       }
+       if ($call eq $main::myalias) {
+               push @out, $self->msg('e11', $call);
+               next;
+       }
+       my $chan = DXChannel::get($call);
+       if ($chan) {
+               push @out, $self->msg('nodee1', $call);
+       } else {
+               $user = DXUser::get($call);
+               $create = !$user;
+               $user = DXUser->new($call) if $create;
+               if ($user) {
+                       $user->sort('L');
+                       $user->homenode($call);
+                       $user->lockout(0);
+                       $user->priv(1) unless $user->priv;
+                       $user->close();
+                       push @out, $self->msg($create ? 'nodecclc' : 'nodeccl', $call);
+               } else {
+                       push @out, $self->msg('e3', "Set CCCluster", $call);
+               }
+       }
+}
+return (1, @out);
index 1a98c7950ad906c1e99541515bb47ac61aaa3a0c..3b0a16fafe0735b73c0b1dcfbd471c22ec23c6ba 100644 (file)
@@ -326,7 +326,7 @@ sub is_bbs
 
 sub is_node
 {
-       return $_[0]->{sort} =~ /^[ACRSX]$/;
+       return $_[0]->{sort} =~ /^[ACRSXL]$/;
 }
 # is it an ak1a node ?
 sub is_ak1a
@@ -375,7 +375,7 @@ sub is_rbn
        return $_[0]->{sort} eq 'N';
 }
 
-sub is_dslink
+sub is_ccluster
 {
        return $_[0]->{sort} eq 'L';
 }
index 766819dc7eef749bbe4b3e06a618a610214dd833..f6347fd9b86b67df6a71664a1a93c59ddad9c27f 100644 (file)
@@ -890,10 +890,6 @@ sub handle_18
        my $pc = shift;
 
        my $conn = $self->conn;
-       unless ($self->outbound) {
-               dbg("PC18 on startup an incoming connection from $self->{call} ignored as iappropriate");
-               return;
-       }
 
        $self->state('init');
 
@@ -914,16 +910,21 @@ sub handle_18
                $self->{build} = $build;
                $self->user->build($build);
                $parent->build($build);
-               dbg("$self->{call} = $software version $version build $build");
-               unless ($self->is_spider) {
-                       dbg("Change U " . $self->user->sort . " C $self->{sort} -> S");
+               dbg("PC18 $self->{call} = $software version $version build $build");
+               if ($software =~ /^DXSp/ && !$self->is_spider) {
+                       dbg("PC18 Change sort U " . $self->user->sort . " C $self->{sort} -> S");
+                       $self->sort('S');
                        $self->user->sort('S');
                        $self->user->put;
-                       $self->sort('S');
                }
-#              $self->{handle_xml}++ if DXXml::available() && $pc->[1] =~ /\bxml/;
+               if ($software =~ /^CC/ && !$self->is_ccluster) {
+                       dbg("PC18 Change sort U " . $self->user->sort . " C $self->{sort} -> L");
+                       $self->sort('L');
+                       $self->user->sort('L');
+                       $self->user->put;
+               }
        } elsif (($software, $version, $build) = $pc->[1] =~ /(AR-Cluster)\s+Version:\s+(\d+\.\d+).?(\d+\.\d+)?/) {
-               dbg("$self->{call} = $software version $version build $build");
+               dbg("PC18 $self->{call} = $software version $version build $build");
                $self->{version} = $version;
                $self->user->version($version);
                $parent->version($version);
@@ -937,20 +938,36 @@ sub handle_18
                        $self->sort('R');
                }
        } else {
-               dbg("$self->{call} = Unknown software ($pc->[1] $pc->[2])");
+               dbg("PC18 $self->{call} = Unknown software ($pc->[1] $pc->[2])");
                $self->version(50.0);
                $self->version($pc->[2] / 100) if $pc->[2] && $pc->[2] =~ /^\d+$/;
                $self->user->version($self->version);
        }
 
+       # for incoming CC Clusters go straight to state 'normal', otherwise bang out.
+       # In future this may well cause a disconnection
+       unless ($self->outbound) {
+               if ($self->is_ccluster) {
+                       my @rout = $parent->del_nodes;
+                       $self->route_pc21($origin, $line, @rout, $parent) if @rout;
+                       $self->send_local_config();
+                       $self->state('normal');
+                       $self->{lastping} = 0;
+                       $self->route_pc92a($main::mycall, undef, $main::routeroot, Route::Node::get($self->{call}));
+               } else {
+                       dbg("PC18 on startup an incoming connection from $self->{call} ignored as iappropriate");
+                       return;
+               }
+       }
+       
        if ($pc->[1] =~ /CC\s*Cluster/i || $pc->[1] =~ /\bpc9x/i) {
                if ($self->{isolate}) {
-                       dbg("$self->{call} pc9x recognised, but node is isolated, using old protocol");
+                       dbg("PC18 $self->{call} pc9x recognised, but node is isolated, using old protocol");
                } elsif (!$self->user->wantpc9x) {
-                       dbg("$self->{call} pc9x explicitly switched off, using old protocol");
+                       dbg("PC18 $self->{call} pc9x explicitly switched off, using old protocol");
                } else {
                        $self->{do_pc9x} = 1;
-                       dbg("$self->{call} Set do PC9x");
+                       dbg("PC18 $self->{call} Set do PC9x");
                }
        }
 
index a78e09552bababe7850ba1dd4085b244ce57356c..f40a7206cc3bdbf8893fc9bc359417c846b4445f 100644 (file)
@@ -233,6 +233,8 @@ package DXM;
                                nodeac => q{$_[0] created as AK1A style Node},
                                nodeb => q{$_[0] set as BBS},
                                nodebc => q{$_[0] created as BBS},
+                               nodeccl => q{$_[0] set as CCCluster style Node},
+                               nodecclc => q{$_[0] created as CCCluster style Node},
                                nodec => q{$_[0] set as CLX style Node},
                                nodecc => q{$_[0] created as CLX style Node},
                                noder => q{$_[0] set as AR-Cluster style Node},
index d0b3cb1dd83d35e840f645dc6498444d13f8d494..d84404b5cdc51b4e814f8b688320c0d7072fdbd2 100644 (file)
@@ -74,7 +74,7 @@ our $spotcachedays = 2;                       # default 2 days worth
 our $minselfspotqrg = 1240000; # minimum freq above which self spotting is allowed
 
 our $readback = $main::is_win ? 0 : 1; # don't read spot files backwards if it's windows
-our $qrggranularity = 25;       # normalise the qrg to this number of hz (default: 25khz), so tough luck if you have a fumble fingers moment
+our $qrggranularity = 1;       # normalise the qrg to this number of khz (default: 25khz), so tough luck if you have a fumble fingers moment
 our $timegranularity = 600;            # ditto to the nearest 100 seconds 
 our $oldstyle = 0;                             # revert to traditional dupe key format
 our $no_node_in_dupe = 1;              # remove the node field from dupe considerations.