use vars qw($VERSION $BRANCH $build $branch);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
-$main::build += 15; # add an offset to make it bigger than last system
+$main::build += 14; # add an offset to make it bigger than last system
$main::build += $VERSION;
$main::branch += $BRANCH;
my ($conn, $msg) = @_;
my ($sort, $call, $line) = DXChannel::decode_input(0, $msg);
return unless defined $sort;
-
+
+ unless (is_callsign($call)) {
+ already_conn($conn, $call, DXM::msg($lang, "illcall", $call));
+ return;
+ }
+
# set up the basic channel info
# is there one already connected to me - locally?
my $user = DXUser->get($call);
already_conn($conn, $call, $mess);
return;
}
+
+ # is he locked out ?
+ my $basecall = $call;
+ $basecall =~ s/-\d+$//;
+ my $baseuser = DXUser->get($basecall);
+ if ($baseuser && $baseuser->lockout) {
+ my $lock = $user->lockout if $user;
+ if (!$user || !defined $lock || $lock) {
+ my $host = $conn->{peerhost} || "unknown";
+ Log('DXCommand', "$call on $host is locked out, disconnected");
+ $conn->disconnect;
+ return;
+ }
+ }
if ($user) {
$user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems
$user = DXUser->new($call);
}
- # is he locked out ?
- if ($user->lockout) {
- my $host = $conn->{peerhost} || "unknown";
- Log('DXCommand', "$call on $host is locked out, disconnected");
- $conn->disconnect;
- return;
- }
# create the channel
$dxchan = DXCommandmode->new($call, $conn, $user) if $user->is_user;