X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=b1b330b2c983f1377ed82faf0dba5397b38d9886;hb=80a2dd317e5d6b24250388b5177cbf85abee5a85;hp=e38e697fd17dfedff5a8c3ba274c143d822a1c38;hpb=0a6cbd253403c416abea676d1bc5fa581caeb354;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index e38e697f..b1b330b2 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -110,7 +110,7 @@ sub rec if ($dxchan = DXChannel->get($call)) { disconnect($dxchan); sleep(1); - } + } # is there one already connected elsewhere in the cluster (and not a cluster) my $user = DXUser->get($call); @@ -213,10 +213,20 @@ sub process_inqueue my $data = $self->{data}; my $dxchan = $self->{dxchan}; my ($sort, $call, $line) = $data =~ /^(\w)(\S+)\|(.*)$/; + + # the above regexp must work + return unless ($sort && $call && $line); + + # translate any crappy characters into hex characters + if ($line =~ /[\x00-\x06\x08\x0a-\x1f\x7f-\xff]/o) { + $line =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg; + dbg('chan', "<- $sort $call **CRAP**: $line"); + return; + } # do the really sexy console interface bit! (Who is going to do the TK interface then?) dbg('chan', "<- $sort $call $line\n") unless $sort eq 'D'; - + # handle A records my $user = $dxchan->user; if ($sort eq 'A' || $sort eq 'O') {