X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=83d9bda7174fc1397cf2b11a4a7457752225b406;hb=45495d980ec748f19509c7668d6b92a06f216ed7;hp=62227d218080c0c8199b4e1cfbee925a4b92d3e2;hpb=1284d2e7cc4c25bb02c7f4fa7c59246de9c0027c;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 62227d21..83d9bda7 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -100,6 +100,8 @@ use USDB; use UDPMsg; use QSL; use Thingy; +use RouteDB; +use AMsg; use Data::Dumper; use IO::File; @@ -127,7 +129,7 @@ $reqreg = 0; # 1 = registration required, 2 = deregister people use vars qw($VERSION $BRANCH $build $branch); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += 4; # add an offset to make it bigger than last system +$main::build += 2; # add an offset to make it bigger than last system $main::build += $VERSION; $main::branch += $BRANCH; @@ -193,24 +195,8 @@ sub new_channel $user = DXUser->new($call); } - # create the channel - if ($user->wantnp) { - if ($user->passphrase && $main::me->user->passphrase) { - $dxchan = QXProt->new($call, $conn, $user); - } else { - unless ($user->passphrase) { - Log('DXCommand', "$call using NP but has no passphrase"); - dbg("$call using NP but has no passphrase"); - } - unless ($main::me->user->passphrase) { - Log('DXCommand', "$main::mycall using NP but has no passphrase"); - dbg("$main::mycall using NP but has no passphrase"); - } - already_conn($conn, $call, "Need to exchange passphrases"); - return; - } - } elsif ($user->is_node) { + if ($user->is_node) { $dxchan = DXProt->new($call, $conn, $user); } elsif ($user->is_user) { $dxchan = DXCommandmode->new($call, $conn, $user); @@ -408,9 +394,9 @@ dbg("DXSpider Version $version, build $build started"); # load Prefixes dbg("loading prefixes ..."); +dbg(USDB::init()); my $r = Prefix::init(); confess $r if $r; -dbg(USDB::init()); # load band data dbg("loading band data ..."); @@ -431,14 +417,16 @@ DXUser->init($userfn, 1); # start listening for incoming messages/connects dbg("starting listeners ..."); my $conn = IntMsg->new_server($clusteraddr, $clusterport, \&login); -$conn->conns("Server $clusteraddr/$clusterport"); +$conn->conns("Server $clusteraddr/$clusterport using IntMsg"); push @listeners, $conn; -dbg("Internal port: $clusteraddr $clusterport"); +dbg("Internal port: $clusteraddr $clusterport using IntMsg"); foreach my $l (@main::listen) { - $conn = ExtMsg->new_server($l->[0], $l->[1], \&login); - $conn->conns("Server $l->[0]/$l->[1]"); + no strict 'refs'; + my $pkg = $l->[2] || 'ExtMsg'; + $conn = $pkg->new_server($l->[0], $l->[1], \&login); + $conn->conns("Server $l->[0]/$l->[1] using $pkg"); push @listeners, $conn; - dbg("External Port: $l->[0] $l->[1]"); + dbg("External Port: $l->[0] $l->[1] using $pkg"); } dbg("AGW Listener") if $AGWMsg::enable;