-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
annok => '9,Accept Announces?,yesno', # accept his announces?
lang => '0,Language',
hmsgno => '0,Highest Msgno',
annok => '9,Accept Announces?,yesno', # accept his announces?
lang => '0,Language',
hmsgno => '0,Highest Msgno',
- group => '0,Chat Group,parray', # used to create a group of users/nodes for some purpose or other
+ group => '0,Group,parray', # used to create a group of users/nodes for some purpose or other
+ buddies => '0,Buddies,parray',
isolate => '9,Isolate network,yesno',
wantbeep => '0,Req Beep,yesno',
wantann => '0,Req Announce,yesno',
isolate => '9,Isolate network,yesno',
wantbeep => '0,Req Beep,yesno',
wantann => '0,Req Announce,yesno',
wantlogininfo => '0,Login Info Req,yesno',
wantgrid => '0,Show DX Grid,yesno',
wantann_talk => '0,Talklike Anns,yesno',
wantlogininfo => '0,Login Info Req,yesno',
wantgrid => '0,Show DX Grid,yesno',
wantann_talk => '0,Talklike Anns,yesno',
- wantpc90 => '1,Req PC90,yesno',
- wantnp => '1,Req New Proto,yesno',
wantpc16 => '9,Want Users from node,yesno',
wantsendpc16 => '9,Send PC16,yesno',
wantroutepc19 => '9,Route PC19,yesno',
wantusstate => '0,Show US State,yesno',
wantdxcq => '0,Show CQ Zone,yesno',
wantdxitu => '0,Show ITU Zone,yesno',
wantpc16 => '9,Want Users from node,yesno',
wantsendpc16 => '9,Send PC16,yesno',
wantroutepc19 => '9,Route PC19,yesno',
wantusstate => '0,Show US State,yesno',
wantdxcq => '0,Show CQ Zone,yesno',
wantdxitu => '0,Show ITU Zone,yesno',
+ wantgtk => '0,Want GTK interface,yesno',
+ wantpc9x => '0,Want PC9X interface,yesno',
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
build => '1,Build',
believe => '1,Believable nodes,parray',
lastping => '1,Last Ping at,ptimelist',
build => '1,Build',
believe => '1,Believable nodes,parray',
lastping => '1,Last Ping at,ptimelist',
$dbm = tie (%u, 'DB_File', $ufn, O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn ($!) [rebuild it from user_asc?]";
}
$dbm = tie (%u, 'DB_File', $ufn, O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn ($!) [rebuild it from user_asc?]";
}
$lru = LRU->newbase("DXUser", $lrusize);
# do a conversion if required
$lru = LRU->newbase("DXUser", $lrusize);
# do a conversion if required
my ($key, $val, $action, $count, $err) = ('','',0,0,0);
my %oldu;
my ($key, $val, $action, $count, $err) = ('','',0,0,0);
my %oldu;
- return $dxchan->user if $dxchan;
- my $rref = Route::get($call);
- return $rref->user if $rref && exists $rref->{user};
- return $pkg->get($call);
+ if ($dxchan) {
+ my $ref = $dxchan->user;
+ return $ref if ref $ref eq 'DXUser';
+
+ dbg("DXUser::get_current: got invalid user ref from dxchan $dxchan->{call} ". ref $ref. " ignoring");
+ }
+ return get($call);
- my $dd = new Data::Dumper([$self]);
- $dd->Indent(0);
- $dd->Terse(1);
- $dd->Quotekeys($] < 5.005 ? 1 : 0);
- return $dd->Dumpxs;
+ my $strip = shift;
+ my $p;
+
+ if ($strip) {
+ my $ref = bless {}, ref $self;
+ foreach my $k (qw(qth lat long qra sort call homenode node lastoper lastin)) {
+ $ref->{$k} = $self->{$k} if exists $self->{$k};
+ }
+ $ref->{name} = $self->{name} if exists $self->{name} && $self->{name} !~ /selfspot/i;
+ $p = dd($ref);
+ } else {
+ $p = dd($self);
+ }
+ return $p;
- rename "$fn.oooo", "$fn.ooooo" if -e "$fn.oooo";
- rename "$fn.ooo", "$fn.oooo" if -e "$fn.ooo";
- rename "$fn.oo", "$fn.ooo" if -e "$fn.oo";
- rename "$fn.o", "$fn.oo" if -e "$fn.o";
- rename "$fn", "$fn.o" if -e "$fn";
+ rename "$fn.oooo", "$fn.ooooo" if -e "$fn.oooo";
+ rename "$fn.ooo", "$fn.oooo" if -e "$fn.ooo";
+ rename "$fn.oo", "$fn.ooo" if -e "$fn.oo";
+ rename "$fn.o", "$fn.oo" if -e "$fn.o";
+ rename "$fn", "$fn.o" if -e "$fn";
for ($action = R_FIRST; !$dbm->seq($key, $val, $action); $action = R_NEXT) {
if (!is_callsign($key) || $key =~ /^0/) {
for ($action = R_FIRST; !$dbm->seq($key, $val, $action); $action = R_NEXT) {
if (!is_callsign($key) || $key =~ /^0/) {
- Log('DXCommand', "Export Error1: $key\t$val");
+ my $eval = $val;
+ my $ekey = $key;
+ $eval =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+ $ekey =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+ LogDbg('DXCommand', "Export Error1: $ekey\t$eval");
unless ($ref->{lat} && $ref->{long} || $ref->{qth} || $ref->{qra}) {
eval {$dbm->del($key)};
dbg(carp("Export Error2: $key\t$val\n$@")) if $@;
unless ($ref->{lat} && $ref->{long} || $ref->{qth} || $ref->{qra}) {
eval {$dbm->del($key)};
dbg(carp("Export Error2: $key\t$val\n$@")) if $@;