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/local";
26 DXUser->del_file($userfn);
31 my $ref = DXUser->get($mycall);
34 my $self = DXUser->new($mycall);
35 $self->{alias} = $myalias;
36 $self->{name} = $myname;
37 $self->{qth} = $myqth;
38 $self->{qra} = $mylocator;
39 $self->{lat} = $mylatitude;
40 $self->{long} = $mylongitude;
41 $self->{email} = $myemail;
42 $self->{bbsaddr} = $mybbsaddr;
43 $self->{homenode} = $mycall;
44 $self->{sort} = 'A'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
45 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
53 # now do one for the alias
54 $ref = DXUser->get($myalias);
57 $self = DXUser->new($myalias);
58 $self->{name} = $myname;
59 $self->{qth} = $myqth;
60 $self->{qra} = $mylocator;
61 $self->{lat} = $mylatitude;
62 $self->{long} = $mylongitude;
63 $self->{email} = $myemail;
64 $self->{bbsaddr} = $mybbsaddr;
65 $self->{homenode} = $mycall;
66 $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
67 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
79 print "Do you wish to destroy your user database (THINK!!!) [y/N]: ";
81 if ($ans =~ /^[Yy]/) {
83 DXUser->init($userfn, 1);
86 print "Do you wish to reset your cluster and sysop information? [y/N]: ";
88 if ($ans =~ /^[Yy]/) {
89 DXUser->init($userfn, 1);
95 DXUser->init($userfn, 1);