X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUser.pm;h=a4e52a26abb1e97a21cc8d657a81c5653c0852e1;hb=d41556c82d7af6d68d9d659bd486be775f82295d;hp=dd35c5e7aeeb268bbcc1706feb5a06ff2cc0a876;hpb=8467e0bbd9951b6b2395e832c7f54f78f5fff8cc;p=spider.git diff --git a/perl/DXUser.pm b/perl/DXUser.pm index dd35c5e7..a4e52a26 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -51,6 +51,8 @@ my $json; buddies => '0,Buddies,parray', build => '1,Build', call => '0,Callsign', + clientoutput => '0,User OUT Format', + clientinput => '0,User IN Format', connlist => '1,Connections,parraydifft', dxok => '9,Accept DX Spots?,yesno', # accept his dx spots? email => '0,E-mail Address,parray', @@ -80,7 +82,7 @@ my $json; prompt => '0,Required Prompt', qra => '0,Locator', qth => '0,Home QTH', - rbnseeme => '0,RBN See Me', + rbnseeme => '0,RBN See Me,yesno', registered => '9,Registered?,yesno', startt => '0,Start Time,cldatetime', version => '1,Version', @@ -130,6 +132,8 @@ sub AUTOLOAD goto &$AUTOLOAD; } +my $readonly; + #use strict; # @@ -159,6 +163,8 @@ sub init $dbm = tie (%u, 'DB_File', $filename, O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn ($!) [rebuild it from user_json?]"; } } + $readonly = !$mode; + die "Cannot open $filename ($!)\n" unless $dbm || $mode == 2; return; } @@ -188,6 +194,7 @@ sub process sub finish { + dbg('DXUser finished') unless $readonly; $dbm->sync; undef $dbm; untie %u; @@ -975,7 +982,15 @@ sub recover LogDbg('command', $s); return ($s); } - + +sub END +{ + if ($dbm) { + print "DXUser Ended\n" unless $readonly; + finish(); + } +} + 1; __END__