ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-IRC3/lib/Net/IRC3/Util.pm
(Generate patch)

Comparing Net-IRC3/lib/Net/IRC3/Util.pm (file contents):
Revision 1.9 by elmex, Sat Feb 24 10:24:55 2007 UTC vs.
Revision 1.10 by elmex, Sun Feb 25 10:58:59 2007 UTC

164=cut 164=cut
165# implemented after the below CTCP spec, but 165# implemented after the below CTCP spec, but
166# doesnt seem to be used by anyone... so it's untested. 166# doesnt seem to be used by anyone... so it's untested.
167sub filter_ctcp_text_attr { 167sub filter_ctcp_text_attr {
168 my ($line, $cb) = @_; 168 my ($line, $cb) = @_;
169 $cb ||= sub { '' }; 169 return unless $cb;
170 $line =~ s/\006([BVUSI])/{warn "FIL\n"; my $c = $cb->($1); defined $c ? $c : "\006$1"}/ieg; 170 $line =~ s/\006([BVUSI])/{warn "FIL\n"; my $c = $cb->($1); defined $c ? $c : "\006$1"}/ieg;
171 $line =~ s/\006CA((?:I[0-9A-F]|#[0-9A-F]{3}){2})/{my $c = $cb->($1); defined $c ? $c : "\006CA$1"}/ieg; 171 $line =~ s/\006CA((?:I[0-9A-F]|#[0-9A-F]{3}){2})/{my $c = $cb->($1); defined $c ? $c : "\006CA$1"}/ieg;
172 $line =~ s/\006C([FB])(I[0-9A-F]|#[0-9A-F]{3})/{my $c = $cb->($1, $2); defined $c ? $c : "\006C$1$2"}/ieg; 172 $line =~ s/\006C([FB])(I[0-9A-F]|#[0-9A-F]{3})/{my $c = $cb->($1, $2); defined $c ? $c : "\006C$1$2"}/ieg;
173 $line =~ s/\006CX([AFB])/{my $c = $cb->($1); defined $c ? $c : "\006CX$1"}/ieg; 173 $line =~ s/\006CX([AFB])/{my $c = $cb->($1); defined $c ? $c : "\006CX$1"}/ieg;
174 return $line; 174 return $line;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines