X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=0f45213596374b5da4c7f585f3bf730906a413dc;hb=17b1614af3840c2c74bee181290eb094f8ed4a00;hp=e6b612fad342942b8733a6e9fce402aaa2e86ac7;hpb=2747e0fe4269e9a7e095c333598191eb9dca63fc;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index e6b612fa..0f452135 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -516,7 +516,7 @@ sub run_cmd # check cmd if ($cmd =~ m|^/| || $cmd =~ m|[^-?\w/]|) { - LogDbg('DXCommand', "cmd: invalid characters in '$cmd'"); + LogDbg('DXCommand', "cmd: $self->{call} - invalid characters in '$cmd'"); return $self->_error_out('e1'); } @@ -959,7 +959,7 @@ sub announce $buf = dd(['ann', $to, $target, $text, @_]) } else { $buf = "$to$target de $_[0]: $text"; - $buf =~ s/\%5E/^/g; + #$buf =~ s/\%5E/^/g; $buf .= "\a\a" if $self->{beep}; } $self->local_send($target eq 'WX' ? 'W' : 'N', $buf); @@ -984,7 +984,7 @@ sub chat $buf = dd(['chat', $to, $target, $text, @_]) } else { $buf = "$target de $_[0]: $text"; - $buf =~ s/\%5E/^/g; + #$buf =~ s/\%5E/^/g; $buf .= "\a\a" if $self->{beep}; } $self->local_send('C', $buf); @@ -997,25 +997,23 @@ sub format_dx_spot my $t = ztime($_[2]); my $loc = ''; my $clth = 30; - --$clth if $self->{consort} eq 'local'; + # --$clth if $self->{consort} eq 'local'; my $comment = substr (($_[3] || ''), 0, $clth); $comment .= ' ' x ($clth - (length($comment))); - if ($self->{user}->wantgrid) { - my $ref = DXUser::get_current($_[4]); - if ($ref && $ref->qra) { - $loc = ' ' . substr($ref->qra, 0, 4); - } - } - if ($self->{user}->wantgrid) { my $ref = DXUser::get_current($_[1]); + if ($ref && $ref->qra) { + my $cloc = ' ' . substr($ref->qra, 0, 4); + $comment = substr $comment, 0, ($clth - (length($comment)+length($cloc))); + $comment .= $cloc; + } + my $origin = $_[4]; + $origin =~ s/-#$//; # sigh...... + $ref = DXUser::get_current($origin); if ($ref && $ref->qra) { $loc = ' ' . substr($ref->qra, 0, 4); - $comment = substr $comment, 0, ($clth - (length($comment)+length($loc))); - $comment .= $loc; - $loc = ''; } } elsif ($self->{user}->wantdxitu) { $loc = ' ' . sprintf("%2d", $_[10]) if defined $_[10]; @@ -1028,7 +1026,7 @@ sub format_dx_spot $comment = substr($comment, 0, $clth-3) . ' ' . $_[12] if $_[12]; } - return sprintf "DX de %-7.7s%11.1f %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment; + return sprintf "DX de %-9.9s%10.1f %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment; } # send a dx spot @@ -1072,7 +1070,7 @@ sub dx_spot } else { $buf = $self->format_dx_spot(@_); $buf .= "\a\a" if $self->{beep}; - $buf =~ s/\%5E/^/g; + #$buf =~ s/\%5E/^/g; } $self->local_send('X', $buf);