Project

General

Profile

Feature #162

Add colors / attributes for IRC

Added by David Demelier over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
libirccd-js
Target version:
Start date:
07/09/2013
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
MFD after:
11/02/2013
MFD revision:
Branch:
Bookmark:
Platform:

Description

We should create a function to facilitate the integration of character sequence such as colors and attributes.

First, map these enum to respectively irccd.util.color and irccd.util.attribute

enum ColorCode {
    White           =   0,   /**< White */
    Black           =   1,   /**< Black */
    DarkBlue        =   2,   /**< Dark blue */
    DarkGreen       =   3,   /**< Dark green */
    Red             =   4,   /**< Red */
    DarkRed         =   5,   /**< Dark red */
    DarkViolet      =   6,   /**< Dark violet */
    Orange          =   7,   /**< Orange */
    Yellow          =   8,   /**< Yellow */
    LightGreen      =   9,   /**< Light green */
    Cyan            =  10,   /**< Cornflower blue */
    LightCyan       =  11,   /**< Light blue */
    Blue            =  12,   /**< Blue */
    Violet          =  13,   /**< Violet */
    DarkGray        =  14,   /**< Dark gray */
    LightGray       =  15   /**< Light gray */
};

enum ControlCode {
    Bold            = 0x02,     /**< Bold */
    Color           = 0x03,     /**< Color */
    Italic          = 0x09,     /**< Italic */
    StrikeThrough   = 0x13,     /**< Strike-Through */
    Reset           = 0x0f,     /**< Reset */
    Underline       = 0x15,     /**< Underline */
    Underline2      = 0x1f,     /**< Underline */
    Reverse         = 0x16      /**< Reverse */
};

Don't forget to add a credit for Joseph Crowell at http://stackoverflow.com/questions/1391610/embed-mirc-color-codes-into-a-c-sharp-literal

Then, create a function irccd.util.format(str, attributes)

History

#1

Updated by David Demelier over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 80

r262

  • Need to add documentation and example
#2

Updated by David Demelier over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100
  • MFD after set to 11/02/2013

Revision r264

#3

Updated by David Demelier over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF