WIP RBN
[spider.git] / perl / cluster.pl
index e13fb03493dea1093bb0c1e2844005fad9ed7078..d3b24ba9838740fde1d5014a0859f56bcfc69970 100755 (executable)
@@ -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 {