Changeset 214b790


Ignore:
Timestamp:
Jan 10, 2008, 3:58:49 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1a64de6
Parents:
b68342b
Message:
strip IRC coloring from IRC messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    rbc0d7bc r214b790  
    161161sub strip_irc_formatting {
    162162    my $body = shift;
    163     my @pieces = split /\x02/, $body;
     163    # Strip mIRC colors. If someone wants to write code to convert
     164    # these to zephyr colors, be my guest.
     165    $body =~ s/\cC\d+(?:,\d+)?//g;
     166    $body =~ s/\cO//g;
     167   
     168    my @pieces = split /\cB/, $body;
    164169     my $out;
    165170    while(@pieces) {
Note: See TracChangeset for help on using the changeset viewer.