set def sendverity=0, some hostname changes
authorDirk Koopman <djk@tobit.co.uk>
Sun, 26 Dec 2021 18:38:33 +0000 (18:38 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Sun, 26 Dec 2021 18:38:33 +0000 (18:38 +0000)
Make sure that an IP address (even 127.0.0.1) is always found.
Don't send PC41 if home isn't changed
set senderverify default = 0.

cmd/announce.pl
cmd/dx.pl
cmd/set/homenode.pl
cmd/show/contest.pl
cmd/show/qrz.pl
cmd/spoof.pl
perl/DXCommandmode.pm
perl/DXProt.pm

index 962aebb6623acd925ba029dd5947132f2ec430f8..9065993b78b02746726c3d62728279d6f248a8b9 100644 (file)
@@ -17,6 +17,8 @@
 
 my ($self, $line) = @_;
 #$DB::single = 1;
+my $addr = $self->hostname || '127.0.0.1';
+Log('cmd', "$self->{call}|$addr|announce|$line");
 my @f = split /\s+/, $line;
 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
 return (1, $self->msg('e9')) if !@f;
index f1f72d4d5a7ada3eed523966fea020d4ccf5cca0..4a80df0e2fae37ab9202c2786b352383b6ff0d67 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -23,6 +23,10 @@ my $oline = $line;
 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
 return (1, $self->msg('e28')) unless $self->isregistered;
 
+
+my $addr = $self->hostname || '127.0.0.1'
+Log('cmd', "$self->{call}|$addr|dx|$line");
+
 my @bad;
 if (@bad = BadWords::check($line)) {   
        $self->badcount(($self->badcount||0) + @bad);
@@ -73,9 +77,7 @@ $line =~ s/^\s*$f[0]\s+$f[1]\s+//;
 $line =~ s/\t+/ /g;                            # do this here because it needs to be stopped ASAP!
 $line ||= ' ';
 
-my $addr = $self->hostname;
 if ($self->conn && $self->conn->peerhost) {
-#      $ipaddr = $addr unless !is_ipaddr($addr) || $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/;
        $ipaddr ||= $addr; # force a PC61 
 } elsif ($self->inscript) {
        $ipaddr = "script";
index 605c0c21063f4b9c07771542edf508e4bba3a95e..f2f8e6e7cbe7e432fec918ba25fea6b325d29f82 100644 (file)
@@ -19,12 +19,14 @@ return (1, $self->msg('hnodee1')) if !$line;
 
 $user = DXUser::get_current($call);
 if ($user) {
-       $line = uc $line;
-       $user->homenode($line);
-       $user->put();
-       my $s = DXProt::pc41($call, 4, $line);
-       DXProt::eph_dup($s);
-       DXChannel::broadcast_all_nodes($s, $main::me) ;
+       $line = uc unpad($line);
+       if ($user->homenode && $line ne $user->homenode) {
+               $user->homenode($line);
+               $user->put();
+               my $s = DXProt::pc41($call, 4, $line);
+               DXProt::eph_dup($s);
+               DXChannel::broadcast_all_nodes($s, $main::me);
+       }
        return (1, $self->msg('hnode', $line));
 } else {
        return (1, $self->msg('namee2', $call));
index a9db4ea7329ae7b2d3f827ad543c3f09ecc9337e..451a55daa528c9417135bef207ba2f54b049f427 100644 (file)
@@ -9,7 +9,7 @@
 sub handle
 {
        my ($self, $line) = @_;
-
+   
        return (1, $self->msg('e24')) unless $Internet::allow;
 
        my @out;
index 5863767ea12c9e9cf469748e778fe9534042c991..1bcd834787455f97aaffd6095eb2f2b480ea85a3 100644 (file)
@@ -73,8 +73,8 @@ sub handle
        my $port = 80;
        my $path = qq{/xml/current/?callsign=$line;username=$Internet::qrz_uid;password=$Internet::qrz_pw;agent=dxspider};
        dbg("qrz: $target:$port$path") if isdbg('qrz');
-
-       Log('call', "$call: show/qrz \U$line");
+       my $addr = $self->hostname || '127.0.0.1';
+       Log('cmd', "$self->{call}|$addr|show/qrz|$line");
        my $conn = AsyncMsg->get($self, $target, $path, filter=>\&filter, prefix=>'qrz> ', on_disc=>\&_on_disc);
        if ($conn) {
                $conn->{state} = 'blank';
index e0194a1178e1bfd5b09eba285da1e9a34a304eb5..c6d93e78da0bb8951d9aa07f978ebf3d0f7f0d85 100644 (file)
@@ -35,7 +35,8 @@ unless ($user) {
 # set up basic environment
 $self->call($call);
 $self->user($user);
-Log('DXCommand', "spoof '$newline' as $call by $mycall");
+my $addr = $self->hostname || '127.0.0.1'
+Log('cmd', "$self->{call}|$addr|spoof|$line");
 my @in = $self->run_cmd($newline);
 push @out, map {"spoof $call: $_"} @in;
 $self->call($mycall);
index 00c82125097dcea4fe077ff4bafc3322d3ea8ccd..a2d59a5884d0a9e3416178a1f4ac91f4d2f814b2 100644 (file)
@@ -552,6 +552,7 @@ sub run_cmd
                        if ($package && $self->can("${package}::handle")) {
                                no strict 'refs';
                                dbg("cmd: package $package") if isdbg('command');
+#                              Log('cmd', "$self->{call} on $self->{hostname} : '$cmd $args'");
                                my $t0 = [gettimeofday];
                                eval { @ans = &{"${package}::handle"}($self, $args) };
                                if ($@) {
index 95940e58690084d097dfcf9ed4006c38921faab0..fe7af2dd7b24d7e8ddc20fbdf02f4e4ee01c1886 100644 (file)
@@ -82,7 +82,7 @@ $pc92_extnode_update_period = 1*60*60; # the update period for external nodes
 $pc92_keepalive_period = 1*60*60;      # frequency of PC92 K (keepalive) records
 %pc92_find = ();                               # outstanding pc92 find operations
 $pc92_find_timeout = 30;               # maximum time to wait for a reply
-$senderverify = 1;                             # 1 = check spotter is on node it says it is and check ip address if available
+$senderverify = 0;                             # 1 = check spotter is on node it says it is and check ip address if available
                                 # 2 = do 1 and dump if check