X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=bfd637c55f7aaa692ff4ca18e22b7d70b6bc7b23;hb=36cf78e5660c745f32be2f1d63be738a0c537c48;hp=d62b88b10840e291033e627f10b3e037b90b5698;hpb=dc0193176be801c10a342dd7a2b2263cf0059c88;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index d62b88b1..bfd637c5 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -233,7 +233,8 @@ sub new_channel already_conn($conn, $call, "Maximum no of web connected connects ($Web::maxssid) exceeded"); return; } - $call = $newcall; + $call = normalise_call($newcall); + $user = DXUser::get_current($call); unless ($user) { $user = DXUser->new($call); @@ -255,6 +256,15 @@ sub new_channel $conn->send_now("C$call"); } else { # "Normal" connections + + # normalise calls like G1TST-0/G1TST-00/G1TST-01 to G1TST and G1TST-1 respectively + my $ncall = normalise_call($call); + if ($call ne $ncall) { + LogDbg('err', "new_channel login invalid $call converted to $ncall"); + $msg =~ s/$call/$ncall/; + $call = $ncall; + } + # is it a valid callsign (in format)? unless (is_callsign($call)) { already_conn($conn, $call, DXM::msg($lang, "illcall", $call)); return; @@ -262,8 +272,8 @@ sub new_channel # is he locked out ? my $lock; - $user = DXUser::get_current($call); $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) {