]> dxcluster.org Git - spider.git/commitdiff
fix some pedantic warnings
authorDirk Koopman <djk@tobit.co.uk>
Wed, 5 Jan 2022 19:45:16 +0000 (19:45 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 5 Jan 2022 19:45:16 +0000 (19:45 +0000)
perl/DXLogPrint.pm
perl/DXProtHandle.pm
perl/DXUser.pm

index 32f39c26904d2560652ed1870651688834f3a55c..92deee427026cf1e574b3a66c5d479a88131304f 100644 (file)
@@ -114,7 +114,7 @@ sub search
                return "show/$name: ${s}not found";
        } 
 
-       for (sort {$a <=> $b } @in) {
+       for (sort {$a cmp $b } @in) {
                push @out, [ split /\^/ ]
        }
 
index 1ba996c8fa2a55470371bad975d0a48de2c45c6b..4572b94ec49a2dd337e6fdb81ac94aeece40edd8 100644 (file)
@@ -1556,6 +1556,8 @@ sub _decode_pc92_call
        my $is_extnode = $flag & 2;
        my $here = $flag & 1;
        my $ip;
+       $part[1] //= 0;
+       $part[2] //= 0;
        if ($part[1] =~ /[,.]/) {
                $ip = $part[1];
                $part[1] = $part[2] = 0;
index a4283c33fb984e81450dbfe750f2ce4d7797e7eb..dd56498e053eb22b2c0ebc7ed69c46151a764d6e 100644 (file)
@@ -499,7 +499,7 @@ print "There are $count user records and $err errors in $diff mS\n";
                                $t //= 0;
                                
                                if ($ref->is_user) {
-                                       if ($ref->{priv} == 0 && $main::systime > $t + $tooold) {
+                                       if (!$ref->{priv} && $main::systime > $t + $tooold) {
                                                unless (($ref->{lat} && $ref->{long}) || $ref->{qth} || $ref->{name} || $ref->{qra}) {
                                                        LogDbg('DXCommand', sprintf("$ref->{call} deleted, empty and too Old at %s", difft($t, ' ')));
                                                        ++$del;
@@ -517,7 +517,7 @@ print "There are $count user records and $err errors in $diff mS\n";
                                                dbg(carp("Export Error2: delete '$key' => '$val' $@")) if $@;
                                                next;
                                        }
-                                       if ($ref->{lockout} == 1 && $ref->{priv} == 1) {
+                                       if (exists $ref->{lockout} && $ref->{lockout} == 1 && exists $ref->{priv} && $ref->{priv} == 1) {
                                                LogDbg('DXCommand', "$ref->{call} depriv'd and unlocked");
                                                $ref->{lockout} = $ref->{priv} = 0;
                                                $ref->put;