Started the new routing stuff which will run in parallel for a while.
[spider.git] / perl / DXProt.pm
index eb65eb44fd7b31415216e7b1209fdf252de50fbe..decd71f674452ea072172baab71a60b280d34f70 100644 (file)
@@ -31,6 +31,7 @@ use WCY;
 use Time::HiRes qw(gettimeofday tv_interval);
 use BadWords;
 use DXHash;
+use Route::Node;
 
 use strict;
 use vars qw($me $pc11_max_age $pc23_max_age
@@ -179,6 +180,8 @@ sub init
        do "$main::data/hop_table.pl" if -e "$main::data/hop_table.pl";
        confess $@ if $@;
        $me->{sort} = 'S';    # S for spider
+       $me->{priv} = 9;
+       $Route::Node::me->adddxchan($me);
 }
 
 #
@@ -1130,6 +1133,7 @@ sub process
                next if $dxchan == $me;
                
                # send a pc50 out on this channel
+               $dxchan->{pc50_t} = $main::systime unless exists $dxchan->{pc50_t};
                if ($t >= $dxchan->{pc50_t} + $DXProt::pc50_interval) {
                        $dxchan->send(pc50(scalar DXChannel::get_all_users));
                        $dxchan->{pc50_t} = $t;