… | |
… | |
226 | Unfortunately the mIRC color coding will destroy improper colored numbers. So this |
226 | Unfortunately the mIRC color coding will destroy improper colored numbers. So this |
227 | function may destroy the message in some occasions a bit. |
227 | function may destroy the message in some occasions a bit. |
228 | |
228 | |
229 | =cut |
229 | =cut |
230 | |
230 | |
231 | sub filter_colors { |
231 | sub filter_colors($) { |
232 | my ($line) = @_; |
232 | my ($line) = @_; |
233 | $line =~ s/\x1B\[.*?[\x00-\x1F\x40-\x7E]//g; # see ECMA-48 + advice by urxvt author |
233 | $line =~ s/\x1B\[.*?[\x00-\x1F\x40-\x7E]//g; # see ECMA-48 + advice by urxvt author |
234 | $line =~ s/\x03\d\d?(?:,\d\d?)?//g; # see http://www.mirc.co.uk/help/color.txt |
234 | $line =~ s/\x03\d\d?(?:,\d\d?)?//g; # see http://www.mirc.co.uk/help/color.txt |
235 | $line |
235 | $line |
236 | } |
236 | } |