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";
33 my $ref = DXUser::get(uc $mycall);
36 my $self = DXUser->new(uc $mycall);
37 $self->{alias} = uc $myalias;
38 $self->{name} = $myname;
39 $self->{qth} = $myqth;
40 $self->{qra} = uc $mylocator;
41 $self->{lat} = $mylatitude;
42 $self->{long} = $mylongitude;
43 $self->{email} = $myemail;
44 $self->{bbsaddr} = $mybbsaddr;
45 $self->{homenode} = uc $mycall;
46 $self->{sort} = 'S'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
47 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
55 # now do one for the alias
56 $ref = DXUser::get(uc $myalias);
59 $self = DXUser->new(uc $myalias);
60 $self->{name} = $myname;
61 $self->{qth} = $myqth;
62 $self->{qra} = uc $mylocator;
63 $self->{lat} = $mylatitude;
64 $self->{long} = $mylongitude;
65 $self->{email} = $myemail;
66 $self->{bbsaddr} = $mybbsaddr;
67 $self->{homenode} = uc $mycall;
68 $self->{sort} = 'U'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
69 $self->{priv} = 9; # 0 - 9 - with 9 being the highest
74 $self->{group} = [qw(local #9000)];
81 die "\$myalias \& \$mycall are the same ($mycall)!, they must be different (hint: make \$mycall = '${mycall}-2';).\n" if $mycall eq $myalias;
83 $lockfn = localdata("cluster.lck"); # lock file name
85 open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";
88 die "Sorry, Lockfile ($lockfn) and process $pid exist, a cluster is running\n" if kill 0, $pid;
94 if (-e "$userfn.v2" || -e "$userfn.v3") {
95 print "Do you wish to destroy your user database (THINK!!!) [y/N]: ";
97 if ($ans =~ /^[Yy]/) {
102 print "Do you wish to reset your cluster and sysop information? [y/N]: ";
104 if ($ans =~ /^[Yy]/) {