@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
-$version = "1.35"; # the version no of the software
+$version = "1.38"; # the version no of the software
$starttime = 0; # the starting time of the cluster
$lockfn = "cluster.lock"; # lock file name
@outstanding_connects = (); # list of outstanding connects
dbg('chan', "-> Z $call bye\n");
$conn->send_now("Z$call|bye"); # this will cause 'client' to disconnect
sleep(1);
- $conn->disconnect;
+ $conn->disconnect();
}
# handle incoming messages
if (defined $err && $err) {
if ($dxchan) {
- disconnect($dxchan);
+ $dxchan->disconnect;
}
return;
}
# set up the basic channel info - this needs a bit more thought - there is duplication here
if (!defined $dxchan) {
my ($sort, $call, $line) = $msg =~ /^(\w)(\S+)\|(.*)$/;
-
- # is there one already connected to me ?
+
+ # is there one already connected to me - locally?
my $user = DXUser->get($call);
if (DXChannel->get($call)) {
- my $mess = DXM::msg($lang, $user->sort eq 'A' ? 'concluster' : 'conother', $call);
+ my $mess = DXM::msg($lang, ($user && $user->sort eq 'A') ? 'concluster' : 'conother', $call);
already_conn($conn, $call, $mess);
return;
}
- # is there one already connected elsewhere in the cluster (and not a cluster)
+ # is there one already connected elsewhere in the cluster?
if ($user) {
if (($user->sort eq 'A' || $call eq $myalias) && !DXCluster->get_exact($call)) {
;
} else {
- if (DXCluster->get($call) || DXChannel->get($call)) {
+ if (DXCluster->get_exact($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 (DXCluster->get($call)) {
+ if (DXCluster->get_exact($call)) {
my $mess = DXM::msg($lang, 'conother', $call);
already_conn($conn, $call, $mess);
return;
};
dbg('local', "Local::finish error $@") if $@;
- # disconnect users
+ # disconnect nodes
foreach $dxchan (DXChannel->get_all()) {
- next if $dxchan->is_ak1a;
+ next unless $dxchan->is_ak1a;
disconnect($dxchan) unless $dxchan == $DXProt::me;
}
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
- # disconnect nodes
+ # disconnect users
foreach $dxchan (DXChannel->get_all()) {
- next unless $dxchan->is_ak1a;
+ next if $dxchan->is_ak1a;
disconnect($dxchan) unless $dxchan == $DXProt::me;
}
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
- Msg->event_loop(1, 0.05);
DXUser::finish();
# close all databases
Log('cluster', "DXSpider V$version started");
# banner
-print "DXSpider DX Cluster Version $version\nCopyright (c) 1998 Dirk Koopman G1TLH\n";
+print "DXSpider DX Cluster Version $version\nCopyright (c) 1998-1999 Dirk Koopman G1TLH\n";
# load Prefixes
print "loading prefixes ...\n";