- 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;
- }
+ my $lock;
+ if ($user) {
+ # make sure we act on any locked status that the actual incoming call has.
+ $lock = $user->lockout;
+ } elsif ($allowmultiple && $call ne $basecall) {
+ # if we are allowing multiple connections and there is a basecall minus incoming ssid, use the basecall's lock status
+ $user = DXUser::get_current($basecall);
+ $lock = $user->lockout if $user;
+ }
+
+ # now deal with the lock
+ if ($lock) {
+ my $host = $conn->peerhost;
+ LogDbg('', "$call on $host is locked out, disconnected");
+ $conn->disconnect;
+ return;