|
Converts all the color codes from libircclient format to mIRC.
- Parameters:
-
message |
A message with color codes |
- Returns:
-
Returns a new message with converted color codes and format options, or 0 if memory could not be allocated. Note that the memory for the new message is allocated using malloc(), so you should free it using free() when it is not used anymore.
The color system of libircclient is designed to be easy to use, and portable between different IRC clients. Every color or format option is described using plain text commands written between square brackets. The possible codes are:
- [B] ... [/B] - bold format mode. Everything between [B] and [/B] is written in bold.
- [I] ... [/I] - italic/reverse format mode. Everything between [I] and [/I] is written in
italic , or reversed (however, because some clients are incapable of rendering italic text, most clients display this as normal text with the background and foreground colors swapped). - [U] ... [/U] - underline format mode. Everything between [U] and [/U] is written underlined.
- [COLOR=RED] ... [/COLOR] - write the text using specified foreground color. The color is set by using the
COLOR keyword, and equal sign followed by text color code (see below). - [COLOR=RED/BLUE] ... [/COLOR] - write the text using specified foreground and background color. The color is set by using the
COLOR keyword, an equal sign followed by text foreground color code, a dash and a text background color code.
The supported text colors are:
- WHITE
- BLACK
- DARKBLUE
- DARKGREEN
- RED
- BROWN
- PURPLE
- OLIVE
- YELLOW
- GREEN
- TEAL
- CYAN
- BLUE
- MAGENTA
- DARKGRAY
- LIGHTGRAY
Examples of color sequences: Hello, [B]Tim[/B].
[U]Arsenal[/U] got a [COLOR=RED]red card[/COLOR]
The tree[U]s[/U] are [COLOR=GREEN/BLACK]green[/COLOR]
- See also:
-
irc_color_strip_from_mirc irc_color_convert_from_mirc
|