X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=fc530e21c1db11b12f554ab43514f33a8e1f01fa;hb=5cbf895de1c7c0a4172e376af0cab8f23ca5c89e;hp=3d38f9c2a486609f0bfe1eb32399425d0ff2a12d;hpb=0917003270018e5fec1f41070acf502a490fd260;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 3d38f9c2..fc530e21 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # This is the DX cluster 'daemon'. It sits in the middle of its little # web of client routines sucking and blowing data where it may. @@ -11,6 +11,7 @@ # require 5.10.1; +use warnings; # make sure that modules are searched in the order local then perl BEGIN { @@ -501,8 +502,18 @@ sub setup_start die "\$myalias \& \$mycall are the same ($mycall)!, they must be different (hint: make \$mycall = '${mycall}-2';). Oh and don't forget to rerun create_sysop.pl!" if $mycall eq $myalias; my $ref = DXUser::get($mycall); die "$mycall missing, run the create_sysop.pl script and please RTFM" unless $ref && $ref->priv == 9; + my $oldsort = $ref->sort; + if ($oldsort ne 'S') { + $ref->sort('S'); + dbg "Resetting node type from $oldsort -> DXSpider ('S')"; + } $ref = DXUser::get($myalias); die "$myalias missing, run the create_sysop.pl script and please RTFM" unless $ref && $ref->priv == 9; + $oldsort = $ref->sort; + if ($oldsort ne 'U') { + $ref->sort('U'); + dbg "Resetting sysop user type from $oldsort -> User ('U')"; + } } # start listening for incoming messages/connects