From: minima Date: Thu, 13 Sep 2001 14:12:14 +0000 (+0000) Subject: and don't forget the line ending mod in here as well! X-Git-Tag: R_1_48~26 X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=2c55757800b9eae67f20137665d912a641d011d1 and don't forget the line ending mod in here as well! --- diff --git a/perl/IntMsg.pm b/perl/IntMsg.pm index 510a1f9a..190d0b43 100644 --- a/perl/IntMsg.pm +++ b/perl/IntMsg.pm @@ -34,12 +34,12 @@ sub dequeue { my $conn = shift; - if ($conn && $conn->{msg} =~ /\n/) { - my @lines = split /\r?\n/, $conn->{msg}; - if ($conn->{msg} =~ /\n$/) { + if ($conn && $conn->{msg} =~ /\cJ/) { + my @lines = $conn->{msg} =~ /([^\cM\cJ]*)\cM?\cJ/g; + if ($conn->{msg} =~ /\cJ$/) { delete $conn->{msg}; } else { - $conn->{msg} = pop @lines; + $conn->{msg} =~ s/([^\cM\cJ]*)\cM?\cJ//g; } for (@lines) { if (defined $_) {