]> dxcluster.org Git - spider.git/commitdiff
and don't forget the line ending mod in here as well!
authorminima <minima>
Thu, 13 Sep 2001 14:12:14 +0000 (14:12 +0000)
committerminima <minima>
Thu, 13 Sep 2001 14:12:14 +0000 (14:12 +0000)
perl/IntMsg.pm

index 510a1f9a661ab03162ba9370c68ab5e3f4a56730..190d0b43c49b4bcaafb8c6d62511af31d30a2270 100644 (file)
@@ -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 $_) {