X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2Fcluster.pl;h=1e7f4f16f1cc6fc0b31bd3aa153d77d45ddb40f3;hb=8ce11d49e52f2ae6ed3c0ddf2a54b2941544acc3;hp=a4185caa5323fb249309f3609a002f4388b5c76a;hpb=9235ff756593fd10cfded4950ce48cf44d0667f6;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index a4185caa..1e7f4f16 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -13,6 +13,7 @@ package main; require 5.10.1; + use warnings; use vars qw($root $is_win $systime $lockfn @inqueue $starttime $lockfn @outstanding_connects @@ -33,7 +34,8 @@ $user_interval = 11*60; # the interval between unsolicited prompts if no traff # make sure that modules are searched in the order local then perl BEGIN { umask 002; - + $SIG{'__WARN__'} = sub { warn $_[0] if $DOWARN }; + # take into account any local::lib that might be present eval { require local::lib; @@ -87,14 +89,13 @@ BEGIN { use DXVars; use SysVar; -use strict; - # order here is important - DXDebug snarfs Carp et al so that Mojo errors go into the debug log use DXDebug; - use Mojolicious 7.26; use Mojo::IOLoop; +$DOWARN = 1; + use Msg; use IntMsg; use Internet; @@ -146,7 +147,7 @@ use DXXml; use DXSql; use IsoTime; use BPQMsg; - +use RBN; use Data::Dumper; @@ -157,6 +158,8 @@ use Web; use vars qw($version $build $gitversion $gitbranch); +use strict; + use Local; @@ -346,7 +349,9 @@ sub new_channel $user->startt($systime); # mark the start time of this connection if ($user->is_node) { - $dxchan = DXProt->new($call, $conn, $user); + $dxchan = DXProt->new($call, $conn, $user); + } elsif ($user->is_rbn) { + $dxchan = RBN->new($newcall, $conn, $user); } elsif ($user->is_user) { $dxchan = DXCommandmode->new($newcall, $conn, $user); } else { @@ -513,8 +518,8 @@ sub setup_start if ($desc) { my ($v, $s, $b, $g) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/; $s ||= ''; - dbg("Git: $desc"); - dbg("Git: V=$v S=$s B=$b g=$g"); + dbg("Git: $desc") if isdbg('git'); + dbg("Git: V=$v S=$s B=$b g=$g") if isdbg('git'); $version = $v; $build = $b || 0; $gitversion = "$g\[r]";