X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=f1759ef5a01e80a178d2210206081afa50ca5409;hb=78ed3f6025103ec1c47c90725e37b417647d83c8;hp=f46ef82d80f20f7ad4f7ef3d19d2685f1ce101ae;hpb=2663e17b1d546b5b6068825f5964bc684e6131cb;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index f46ef82d..f1759ef5 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -31,6 +31,8 @@ use DXProt; use DXMsg; use DXCluster; use DXDebug; +use DXCron; +use DXConnect; use Prefix; use Bands; @@ -140,7 +142,13 @@ sub process_inqueue $dxchan->start($line); } elsif ($sort eq 'D') { die "\$user not defined for $call" if !defined $user; - $dxchan->normal($line); + if ($dxchan->{func}) { + # call an ongoing routine if there is a function specified + &{$dxchan->{func}} ($dxchan, $line); + } else { + # normal input + $dxchan->normal($line); + } disconnect($dxchan) if ($dxchan->{state} eq 'bye'); } elsif ($sort eq 'Z') { disconnect($dxchan); @@ -189,6 +197,14 @@ DXProt->init(); # put in a DXCluster node for us here so we can add users and take them away DXNode->new(0, $mycall, 0, 1, $DXProt::myprot_version); +# read in any existing message headers +print "reading existing message headers\n"; +DXMsg->init(); + +# read in any cron jobs +print "reading cron jobs\n"; +DXCron->init(); + # this, such as it is, is the main loop! print "orft we jolly well go ...\n"; for (;;) { @@ -204,6 +220,8 @@ for (;;) { $ztime = &ztime(); DXCommandmode::process(); # process ongoing command mode stuff DXProt::process(); # process ongoing ak1a pcxx stuff + DXCron::process(); + DXConnect::process(); } }