3 # create a NEW user database and the sysop record
5 # WARNING - running this will destroy any existing user database
7 # Copyright (c) 1998 Dirk Koopman G1TLH
12 # make sure that modules are searched in the order local then perl
14 # root of directory tree for this system
16 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
18 unshift @INC, "$root/perl"; # this IS the right way round!
19 unshift @INC, "$root/local";
27 system("rm -f $userfn*");
28 DXUser->init($userfn);
29 my $self = DXUser->new($mycall);
30 $self->{alias} = $myalias;
31 $self->{name} = $myname;
32 $self->{qth} = $myqth;
33 $self->{qra} = $mylocator;
34 $self->{lat} = $mylatitude;
35 $self->{long} = $mylongtitude;
36 $self->{email} = $myemail;
37 $self->{bbsaddr} = $mybbsaddr;
38 $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
39 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
47 # now do one for the alias
48 $self = DXUser->new($myalias);
49 $self->{name} = $myname;
50 $self->{qth} = $myqth;
51 $self->{qra} = $mylocator;
52 $self->{lat} = $mylatitude;
53 $self->{long} = $mylongtitude;
54 $self->{email} = $myemail;
55 $self->{bbsaddr} = $mybbsaddr;
56 $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
57 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
66 print "New user database created as $userfn\n";
70 print "This program will destroy your user database!!!!\n\nDo you wish to continue [y/N]: ";
72 create_it() if ($ans =~ /^[Yy]/);