String::Tagged::IRC - parse and format IRC messages using
This module provides the following tags, conforming to the String::Tagged::Formatting API specification.
Boolean values indicating bold, underline, italics, or reverse-video.
Convert::Color objects encoding the color. These will likely be instances of Convert::Color::mIRC, unless a full RGB triplet colour code has been provided; in which case it will be an instance of Convert::Color::RGB8.
Parses a text string containing IRC formatting codes and returns a new
Takes the following named options:
- parse_plain_formatting => BOOL
If true, also parse "poor-man's" plain-text formatting of *bold*, /italic/ and _underline_. In this case, formatting tags are added but the original text formatting is preserved.
Returns a plain text string containing IRC formatting codes built from the given instance. When outputting a colour index, this method always outputs it as a two-digit number, to avoid parsing ambiguity if the coloured text starts with a digit.
Currently this will only output mIRC-style formatting, not irssi-style.
Takes the following options:
- default_fg => INT
Default foreground colour to emit for extents that have only the
bgtag set. This is required because mIRC formatting codes cannot set just the background colour without setting the foreground as well.
Define a nicer way to do the ANSI terminal colour space of irssi-style formatting codes.
Paul Evans <firstname.lastname@example.org>