+20Aug02=======================================================================
+1. fix lines containing just the character '0' in messages (and console.pl)
+(K1XX).
06Aug02=======================================================================
1. added 5.5Mhz band as '60m'.
29Jul02=======================================================================
sub pc29
{
my ($fromnode, $tonode, $stream, $text) = @_;
- $text = ' ' unless $text && length $text > 0;
+ $text = ' ' unless defined $text && length $text > 0;
$text =~ s/\^/%5E/og; # remove ^
return "PC29^$fromnode^$tonode^$stream^$text^~";
}
# check that a PC protocol field is valid text
sub is_pctext
{
+ return undef unless length $_[0];
return undef if $_[0] =~ /[\x00-\x08\x0a-\x1f\x80-\x9f]/;
- return $_[0];
+ return 1;
}
# check that a PC prot flag is fairly valid (doesn't check the difference between 1/0 and */-)
if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") {
# save the lines
- $inbuf = " " unless length($inbuf);
+ $inbuf = " " unless length $inbuf;
# check for a pling and do a search back for a command
if ($inbuf =~ /^!/o) {
return;
}
}
- push @khistory, $inbuf if $inbuf;
+ push @khistory, $inbuf if length $inbuf;
shift @khistory if @khistory > $maxkhist;
$khistpos = @khistory;
$bot->move(0,0);
} elsif ($r eq KEY_RESIZE || $r eq "\0632") {
do_resize();
return;
- } elsif (defined is_pctext($r)) {
+ } elsif (defined $r && is_pctext($r)) {
# move the top screen back to the bottom if you type something
if ($spos < @shistory) {
$spos = @shistory;