X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=8abd8d4eeadc586b387b71974c38951be9f3069e;hb=d5bbb8b5085e57870503e56c79cdebb26122c915;hp=b9e6c67878b2288f3a32d0c629ef3e73ca1a6ef3;hpb=7e3729a9039462c460dae4804f40c0bd506f3423;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index b9e6c678..8abd8d4e 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -208,7 +208,7 @@ sub start # is this a bad ip address? if (is_ipaddr($self->{hostname})) { - $self->{badip} = DXCIDR->find($self->{hostname}); + $self->{badip} = DXCIDR::find($self->{hostname}); } # do we need to send a forward/opernam? @@ -1057,7 +1057,21 @@ sub format_dx_spot } } - return sprintf "DX de %-8.8s%10.1f %-12.12s %-s $t$slot2", "$_[4]:", $_[0], $_[1], $comment; + my $o = sprintf("%-9s", $_[4] . ':'); + my $qrg = sprintf "%8.1f", $_[0]; + if (length $qrg >= 9) { + while (length($o)+length($qrg) > 17 && $o =~ / $/) { + chop $o; + } + } + my $spot = sprintf "%-12s", $_[1]; + my $front = "DX de $o $qrg $spot"; + while (length($front) > 38 && $front =~ / $/) { + chop $front; + } + + + return sprintf "$front %-s $t$slot2", $comment; }