projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove any trailing \rs from the ends of lines
[spider.git]
/
perl
/
DXMsg.pm
diff --git
a/perl/DXMsg.pm
b/perl/DXMsg.pm
index cd3bf74b0f757922abcb78545cd274899d31aa41..bb80e6c1908183ffbb16bf027a34e76c30478243 100644
(file)
--- a/
perl/DXMsg.pm
+++ b/
perl/DXMsg.pm
@@
-518,6
+518,7
@@
sub store
my $line;
$ref->{size} = 0;
foreach $line (@{$lines}) {
my $line;
$ref->{size} = 0;
foreach $line (@{$lines}) {
+ $line =~ s/[\x00-\x08\x0a-\x1f\xf0-\xff]/./g;
$ref->{size} += (length $line) + 1;
print $fh "$line\n";
}
$ref->{size} += (length $line) + 1;
print $fh "$line\n";
}
@@
-530,7
+531,7
@@
sub store
}
# actual remove all the 'deleted' messages in one hit.
}
# actual remove all the 'deleted' messages in one hit.
- # this has to
m
e delayed until here otherwise it only does one at
+ # this has to
b
e delayed until here otherwise it only does one at
# a time because @msg is rewritten everytime del_msg is called.
my @del = grep {!$_->{tonode} && $_->{delete} && $_->{deletetime} < $main::systime} @msg;
for (@del) {
# a time because @msg is rewritten everytime del_msg is called.
my @del = grep {!$_->{tonode} && $_->{delete} && $_->{deletetime} < $main::systime} @msg;
for (@del) {
@@
-788,14
+789,15
@@
sub for_me
{
my $call = uc shift;
my $ref;
{
my $call = uc shift;
my $ref;
+ my $count;
foreach $ref (@msg) {
# is it for me, private and unread?
if ($ref->{to} eq $call && $ref->{private}) {
foreach $ref (@msg) {
# is it for me, private and unread?
if ($ref->{to} eq $call && $ref->{private}) {
-
return 1 if !$ref->{'read'
};
+
$count++ unless $ref->{'read'} || $ref->{delete
};
}
}
}
}
- return
0
;
+ return
$count
;
}
# start the message off on its travels with a PC28
}
# start the message off on its travels with a PC28
@@
-1092,7
+1094,7
@@
sub do_send_stuff
$loc->{reject}++;
}
$loc->{reject}++;
}
- if (@{$loc->{lines}}) {
+ if (
$loc->{lines} &&
@{$loc->{lines}}) {
push @{$loc->{lines}}, length($line) > 0 ? $line : " ";
} else {
# temporarily store any R: lines so that we end up with
push @{$loc->{lines}}, length($line) > 0 ? $line : " ";
} else {
# temporarily store any R: lines so that we end up with