- $basecall =~ s/-\d+$//; # remember this for later multiple user processing
- my $baseuser = DXUser::get_current($basecall);
- my $lock = $user->lockout if $user;
- if ($baseuser && $baseuser->lockout || $lock) {
- if (!$user || !defined $lock || $lock) {
- my $host = $conn->peerhost;
- LogDbg('DXCommand', "$call on $host is locked out, disconnected");
- $conn->disconnect;
- return;
- }
+ $basecall =~ s/-\d+$//; # remember this for later multiple user processing, it's used for other stuff than checking lockout status
+ if ($user) {
+ # make sure we act on any locked status that the actual incoming call has.
+ $lock = $user->lockout;
+ } elsif ($basecall ne $call) {
+ # if there isn't a SSID on the $call, then try the base
+ my $luser = DXUser::get_current($basecall);
+ $lock = $luser->lockout if $luser;
+ }
+
+ # now deal with the lock
+ if ($lock) {
+ my $host = $conn->peerhost;
+ LogDbg('', "$call on $host is locked out, disconnected");
+ $conn->disconnect;
+ return;