made all protocol except PC29 reject %xx characters

mode console reset its top screen when you start to type in stuff
This commit is contained in:
djk 1999-08-18 07:53:37 +00:00
parent fd76651ac5
commit e0278322b7
4 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,7 @@
17Aug99=======================================================================
1. all protocol except PC29 containing %XX characters will be dumped.
2. Changed console.pl so that if you start typing it moves the top window
back to the bottom.
19Jul99=======================================================================
1. Added iota and qra clauses to sh/dx as well, these take optional arguments
and will look for the appropriate strings.

View File

@ -149,7 +149,13 @@ sub normal
my ($pcno) = $field[0] =~ /^PC(\d\d)/; # just get the number
return unless $pcno;
return if $pcno < 10 || $pcno > 51;
# dump bad protocol messages unless it is a PC29
if ($line =~ /\%[0-9A-F][0-9A-F]/o && $pcno != 29) {
dbg('chan', "CORRUPT protocol message - dumped");
return;
}
# local processing 1
my $pcr;
eval {

View File

@ -261,6 +261,7 @@ sub dochat
for (;;) {
if ($csort eq 'telnet') {
$line = $sock->get();
cease(11) unless $line; # the socket has gone away?
$line =~ s/\r\n/\n/og;
chomp;
} elsif ($csort eq 'ax25' || $csort eq 'prog') {

View File

@ -159,6 +159,7 @@ sub rec_stdin
# $prbuf =~ s/\n/\\n/;
# print "sys: $r ($prbuf)\n";
if (defined $r) {
if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") {
# save the lines
@ -266,6 +267,13 @@ sub rec_stdin
beep();
}
} elsif ($r ge ' ' && $r le '~') {
# move the top screen back to the bottom if you type something
if ($spos < @shistory - 1) {
$spos = @shistory;
show_screen();
}
# insert the character into the keyboard buffer
if ($pos < $lth) {
my $a = substr($inbuf, 0, $pos);
my $b = substr($inbuf, $pos);