# try to create and lock a lockfile (this isn't atomic but
# should do for now
- $lockfn = "$root/perl/cluster.lck"; # lock file name
+ $lockfn = "$root/local/cluster.lck"; # lock file name
if (-e $lockfn) {
open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
my $pid = <CLLOCK>;
use DXProtVars;
use DXProtout;
use DXProt;
-use QXProt;
use DXMsg;
use DXCron;
use DXConnect;
use Mrtg;
use USDB;
use UDPMsg;
+use QSL;
+use Thingy;
use Data::Dumper;
use IO::File;
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 += 6; # add an offset to make it bigger than last system
+$main::build += 4; # add an offset to make it bigger than last system
$main::build += $VERSION;
$main::branch += $BRANCH;
# 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);
return unless defined $sort;
# do the really sexy console interface bit! (Who is going to do the TK interface then?)
- dbg("<- $sort $call $line\n") if $sort ne 'D' && isdbg('chan');
+ dbg("<- $sort $call $line") if $sort ne 'D' && isdbg('chan');
if ($self->{disconnecting}) {
dbg('In disconnection, ignored');
next;
# load Prefixes
dbg("loading prefixes ...");
-my $r = Prefix::load();
-confess $r if $r;
dbg(USDB::init());
+my $r = Prefix::init();
+confess $r if $r;
# load band data
dbg("loading band data ...");
# initialise the protocol engine
dbg("Start Protocol Engines ...");
DXProt->init();
-QXProt->init();
# put in a DXCluster node for us here so we can add users and take them away
-$routeroot = Route::Node->new($mycall, $version*100+5300, Route::here($main::me->here)|Route::conf($main::me->conf));
+$routeroot = Route::Node->new($mycall);
+$routeroot->version($version*100+5300);
+$routeroot->here($main::me->here || 1);
+$routeroot->conf($main::me->conf || 0);
+$routeroot->add_dxchan($me);
+$routeroot->lastseen(time);
# make sure that there is a routing OUTPUT node default file
#unless (Filter::read_in('route', 'node_default', 0)) {
# starting local stuff
dbg("doing local initialisation ...");
+QSL::init(1);
eval {
Local::init();
};
DXCron::process(); # do cron jobs
DXCommandmode::process(); # process ongoing command mode stuff
DXProt::process(); # process ongoing ak1a pcxx stuff
- QXProt::process();
DXConnect::process();
DXMsg::process();
DXDb::process();
DXUser::process();
DXDupe::process();
AGWMsg::process();
-
+
+ # this where things really start to happen (in DXSpider 2)
+ Thingy::process();
+
eval {
Local::process(); # do any localised processing
};