+ # is he locked out ?
+ my $lock;
+ $conn->conns($call);
+ $user = DXUser::get_current($call);
+ my $basecall = $call;
+ $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
+ my $host = $conn->peerhost;
+ if ($lock) {
+ LogDbg('', "$call on $host is locked out, disconnected");
+ $conn->disconnect;
+ return;
+ }
+
+ # Is he from a badip?
+ if (DXCIDR::find($host)) {
+ LogDbg('', "$call on $host is from a badip $host, disconnected");
+ $conn->disconnect;
+ return;
+ }
+