06Nov01=======================================================================
1. fix read so that sysop reading doesn't increment the read counter for
private mail not addressed to them.
+2. fix console.pl to show blank lines more reliably.
+3. fix msgs so that 2 R: lines are only stored on initial entry (not just
+after forwarding).
04Nov01=======================================================================
1. Allow the user to equal the node in RSPF checks (this allows spots and
stuff with the origin and spotter to be the same (although it is STRONGLY
$self->{priv} = $user->priv || 0;
$self->{lang} = $user->lang || $main::lang || 'en';
$self->{pagelth} = $user->pagelth || 20;
- ($self->{width}) = $line =~ /width=(\d+)/;
+ ($self->{width}) = $line =~ /width=(\d+)/; $line =~ s/\s*width=\d+\s*//;
$self->{width} = 80 unless $self->{width} && $self->{width} > 80;
$self->{consort} = $line; # save the connection type
Log('msg', "line: $line");
$loc->{reject}++;
}
+
+ if (@{$loc->{lines}}) {
+ push @{$loc->{lines}}, length($line) > 0 ? $line : " ";
+ } else {
+ # temporarily store any R: lines so that we end up with
+ # only the first and last ones stored.
+ if ($line =~ m|^R:\d{6}/\d{4}|) {
+ push @{$loc->{tempr}}, $line;
+ } else {
+ if (exists $loc->{tempr}) {
+ push @{$loc->{lines}}, shift @{$loc->{tempr}};
+ push @{$loc->{lines}}, pop @{$loc->{tempr}} if @{$loc->{tempr}};
+ delete $loc->{tempr};
+ }
+ push @{$loc->{lines}}, length($line) > 0 ? $line : " ";
+ }
+ }
# i.e. it ain't and end or abort, therefore store the line
- push @{$loc->{lines}}, length($line) > 0 ? $line : " ";
}
}
return @out;
my $lines = measure($line);
last if $i + $lines > $pagel;
setattr($line);
- $top->addstr($i, 0, $line);
+ $top->addstr($i, 0, "$line\n");
$top->attrset(COLOR_PAIR(0)) if $has_colors;
$i += $lines;
}
my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
if ($sort && $sort eq 'D') {
+ $line = " " unless $line;
addtotop($line);
} elsif ($sort && $sort eq 'Z') { # end, disconnect, go, away .....
cease(0);
if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") {
# save the lines
- if ($inbuf) {
- # check for a pling and do a search back for a command
- if ($inbuf =~ /^!/o) {
- my $i;
- $inbuf =~ s/^!//o;
- for ($i = $#khistory; $i >= 0; $i--) {
- if ($khistory[$i] =~ /^$inbuf/) {
- $inbuf = $khistory[$i];
- last;
- }
- }
- if ($i < 0) {
- beep();
- return;
+ $inbuf = " " unless $inbuf;
+
+ # check for a pling and do a search back for a command
+ if ($inbuf =~ /^!/o) {
+ my $i;
+ $inbuf =~ s/^!//o;
+ for ($i = $#khistory; $i >= 0; $i--) {
+ if ($khistory[$i] =~ /^$inbuf/) {
+ $inbuf = $khistory[$i];
+ last;
}
}
- push @khistory, $inbuf if $inbuf;
- shift @khistory if @khistory > $maxkhist;
- $khistpos = @khistory;
- $bot->move(0,0);
- $bot->clrtoeol();
- $bot->addstr(substr($inbuf, 0, $cols));
+ if ($i < 0) {
+ beep();
+ return;
+ }
}
+ push @khistory, $inbuf if $inbuf;
+ shift @khistory if @khistory > $maxkhist;
+ $khistpos = @khistory;
+ $bot->move(0,0);
+ $bot->clrtoeol();
+ $bot->addstr(substr($inbuf, 0, $cols));
# add it to the monitor window
unless ($spos == @shistory) {
$spos = @shistory;
show_screen();
};
- addtotop($inbuf) if $inbuf;
+ addtotop($inbuf);
# send it to the cluster
- $inbuf = " " unless $inbuf;
$conn->send_later("I$call|$inbuf");
$inbuf = "";
$pos = $lth = 0;