@ISA = qw(DXChannel);
-use 5.10.1;
+use 5.8.1;
use POSIX qw(:math_h);
use DXUtil;
sub valid_package_name {
my $string = shift;
$string =~ s|([^A-Za-z0-9_/])|sprintf("_%2x",unpack("C",$1))|eg;
-
$string =~ s|/|_|g;
return "cmd_$string";
}
};
#wrap the code into a subroutine inside our unique package
- my $eval = qq(package DXCommandmode::$package; use 5.10.1; use POSIX qw{:math_h}; use DXLog; use DXDebug; use DXUser; use DXUtil; our \@ISA = qw{DXCommandmode}; );
+ my $eval = qq(package DXCommandmode::$package; use 5.8.1; use POSIX qw{:math_h}; use DXLog; use DXDebug; use DXUser; use DXUtil; our \@ISA = qw{DXCommandmode}; );
if ($sub =~ m|\s*sub\s+handle\n|) {
# this is to fix a problem I introduced some build ago by using this function for users
# whereas it was only being used for nodes.
- if ($user->is_user && $user->lockout && ($user->priv // 0) == 1) {
+ if ($user->is_user && $user->lockout && ($user->priv || 0) == 1) {
$user->priv(0);
$user->lockout(0);
dbg("DXProt: PC92 user record for $call depriv'd and unlocked");
my $version = $part[1] || 0;
my $build = $part[2] || 0;
my $ip = $part[3] || '';
-
- if ($version =~ /[,.]/) {
+
+ if (length $version > 4 && $version =~ /[,\.][\da-f]{1,4}/i) {
$ip = $version;
$version = 0;
}
} elsif ($user->is_spider && ($version < 3000 || ($version > 4000 && $version < 5455))) {
unless ($version == 5000 && $build == 0) {
$user->sort('A');
- $build //= 0;
+ $build ||= 0;
dbg("PCProt::_add_thingy node $call v: $version b: $build sort ($old) downgraded to " . $user->sort);
}
}
my $oldbuild = $parent->build || 0;
my $oldversion = $parent->version || 0;
my $user = check_add_user($parent->call, 'S');
- my $oldsort = $user->sort // '';
+ my $oldsort = $user->sort || '';
dbg("PCProt PC92 K v: $version ov: $oldversion b: $build ob: $oldbuild pk: " . ($parent->K || '0') . " uk: " . ($user->K || 0)) if isdbg('pc92k');
);
-$clusteraddr //= '127.0.0.1'; # cluster tcp host address - used for things like console.pl
-$clusterport //= 27754; # cluster tcp port
+$clusteraddr ||= '127.0.0.1'; # cluster tcp host address - used for things like console.pl
+$clusterport ||= 27754; # cluster tcp port
@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
$starttime = 0; # the starting time of the cluster
# initialisation
#
-$clusteraddr //= '127.0.0.1';
-$clusterport //= 27754;
+$clusteraddr ||= '127.0.0.1';
+$clusterport ||= 27754;
$call = ""; # the callsign being used
$node = ""; # the node callsign being used