X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=32f90d88ded118a462f2b75bc247352d3d23c726;hb=97d5445b1e468d9228367640421b2f90ac021224;hp=ad71b688ac7ce8e86f46f685deb4e6d3a06c1259;hpb=69c8aeb338cc485103e289fbab7ec4e7e056ed20;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index ad71b688..32f90d88 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -10,6 +10,8 @@ # $Id$ # +require 5.004; + # make sure that modules are searched in the order local then perl BEGIN { # root of directory tree for this system @@ -89,34 +91,25 @@ sub rec # is there one already connected elsewhere in the cluster (and not a cluster) my $user = DXUser->get($call); if ($user) { - if ($user->sort eq 'A' && !DXCluster->get_exact($call)) { - ; - } elsif ($user->sort eq 'U' && $call eq $main::myalias && !DXCluster->get_exact($call)) { + if (($user->sort eq 'A' || $call == $myalias) && !DXCluster->get_exact($call)) { ; } else { - if (DXChannel->get($call)) { + if (DXCluster->get($call) || DXChannel->get($call)) { my $mess = DXM::msg($lang, $user->sort eq 'A' ? 'concluster' : 'conother', $call); already_conn($conn, $call, $mess); return; } } + $user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems } else { - if (DXChannel->get($call)) { + if (DXCluster->get($call)) { my $mess = DXM::msg($lang, 'conother', $call); already_conn($conn, $call, $mess); return; } - } - - - # the user MAY have an SSID if local, but otherwise doesn't - my $user = DXUser->get($call); - if (!defined $user) { $user = DXUser->new($call); - } else { - $user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems } - + # is he locked out ? if ($user->lockout) { Log('DXCommand', "$call is locked out, disconnected"); @@ -149,7 +142,7 @@ sub cease { my $dxchan; foreach $dxchan (DXChannel->get_all()) { - disconnect($dxchan); + disconnect($dxchan) unless $dxchan == $DXProt::me; } Log('cluster', "DXSpider V$version stopped"); exit(0);