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->{homenode} = $mycall;
39 $self->{sort} = 'A'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
40 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
48 # now do one for the alias
49 $self = DXUser->new($myalias);
50 $self->{name} = $myname;
51 $self->{qth} = $myqth;
52 $self->{qra} = $mylocator;
53 $self->{lat} = $mylatitude;
54 $self->{long} = $mylongtitude;
55 $self->{email} = $myemail;
56 $self->{bbsaddr} = $mybbsaddr;
57 $self->{homenode} = $mycall;
58 $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
59 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
69 print "New user database created as $userfn\n";
73 print "This program will destroy your user database!!!!\n\nDo you wish to continue [y/N]: ";
75 create_it() if ($ans =~ /^[Yy]/);