X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcreate_sysop.pl;h=1e553209d9045dacc65d7b2712cc0e83e2182428;hb=3f145290a93b39bf15b50269dd8be585d7b4bc9c;hp=dcab2f1559ca0281536da5c7e2c709335071f86e;hpb=60c0ea1747bc8ad95e531d29025f7bcee4fd10c1;p=spider.git diff --git a/perl/create_sysop.pl b/perl/create_sysop.pl index dcab2f15..1e553209 100755 --- a/perl/create_sysop.pl +++ b/perl/create_sysop.pl @@ -9,6 +9,16 @@ # $Id$ # +# make sure that modules are searched in the order local then perl +BEGIN { + # root of directory tree for this system + $root = "/spider"; + $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'}; + + unshift @INC, "$root/perl"; # this IS the right way round! + unshift @INC, "$root/local"; +} + use DXVars; use DXUser; @@ -24,12 +34,34 @@ sub create_it $self->{lat} = $mylatitude; $self->{long} = $mylongtitude; $self->{email} = $myemail; - $self->{sort} = 'C'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS + $self->{bbsaddr} = $mybbsaddr; + $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS + $self->{priv} = 9; # 0 - 9 - with 9 being the highest + $self->{lastin} = 0; + $self->{dxok} = 1; + $self->{annok} = 1; + + # write it away + $self->close(); + + # now do one for the alias + $self = DXUser->new($myalias); + $self->{name} = $myname; + $self->{qth} = $myqth; + $self->{qra} = $mylocator; + $self->{lat} = $mylatitude; + $self->{long} = $mylongtitude; + $self->{email} = $myemail; + $self->{bbsaddr} = $mybbsaddr; + $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS $self->{priv} = 9; # 0 - 9 - with 9 being the highest $self->{lastin} = 0; + $self->{dxok} = 1; + $self->{annok} = 1; # write it away $self->close(); + DXUser->finish(); print "New user database created as $userfn\n"; }