Opened 11 years ago

Last modified 11 years ago

#258 new defect

irc-msg sometimes duplicates spaces

Reported by: jgross@mit.edu Owned by:
Priority: major Milestone:
Component: IRC Keywords: irc unknown-cause
Cc:

Description

If I :irc-msg text like

|123456789|123456789|123456789|123456789|123456789|123456789|.  |

(61 characters, a period, two spaces, and then another character), the actual message that shows up (both sent and received) has 6 spaces rather than two (in this case

|123456789|123456789|123456789|123456789|123456789|123456789|.      |

).

I suspect that I introduced this bug at c2866ecce166474ab92c7f75d53d7de0d6d884a0, though I haven't checked. However, running the main chunk of irc-msg by hand does not result in this behavior; running

$ perl -e 'use Text::Wrap;
my $fullbody = "|123456789|123456789|123456789|123456789|123456789|123456789|.  |";
print("$fullbody\n");
$fullbody =~ s/\r//g;
print("$fullbody\n");
my @msgs = split "\n\n", $fullbody;
print((join "\n", @msgs) . "\n");
map { tr/\n/ / } @msgs;
print((join "\n", @msgs) . "\n");
local($Text::Wrap::columns) = 450;
print((wrap("", "", join "\n", @msgs)) . "\n");'

gives

|123456789|123456789|123456789|123456789|123456789|123456789|.  |
|123456789|123456789|123456789|123456789|123456789|123456789|.  |
|123456789|123456789|123456789|123456789|123456789|123456789|.  |
|123456789|123456789|123456789|123456789|123456789|123456789|.  |
|123456789|123456789|123456789|123456789|123456789|123456789|.  | 

Change History (1)

comment:1 Changed 11 years ago by jgross@mit.edu

People tell me that on other IRC clients, this renders as C-I. I'm rather confused, but suspect this is https://github.com/barnowl/barnowl/blob/master/perl/modules/IRC/lib/BarnOwl/Module/IRC.pm#L444 or L435 or L437.

Note: See TracTickets for help on using tickets.