Skip to content

Commit

Permalink
irc: add support for color codes 16-99 in IRC messages (closes #228) …
Browse files Browse the repository at this point in the history
…(patch from Nei)
  • Loading branch information
flashcode committed Nov 11, 2014
1 parent 76d2e72 commit 9be4bc0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
1 change: 1 addition & 0 deletions ChangeLog.asciidoc
Expand Up @@ -30,6 +30,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* api: add regex replace feature in function string_eval_expression
* api: use microseconds instead of milliseconds in functions util_timeval_diff
and util_timeval_add
* irc: add support for color codes 16-99 in IRC messages (closes #228)
* irc: disable SSLv3 by default in server option "ssl_priorities" (closes #248)
* irc: add support of "extended-join" capability (closes #143, closes #212)
* irc: automatically add current channel in command /samode (closes #241)
Expand Down
44 changes: 28 additions & 16 deletions src/plugins/irc/irc-color.c
Expand Up @@ -32,22 +32,34 @@


char *irc_color_to_weechat[IRC_NUM_COLORS] =
{ /* 0 */ "white",
/* 1 */ "black",
/* 2 */ "blue",
/* 3 */ "green",
/* 4 */ "lightred",
/* 5 */ "red",
/* 6 */ "magenta",
/* 7 */ "brown",
/* 8 */ "yellow",
/* 9 */ "lightgreen",
/* 10 */ "cyan",
/* 11 */ "lightcyan",
/* 12 */ "lightblue",
/* 13 */ "lightmagenta",
/* 14 */ "darkgray",
/* 15 */ "gray"
{ /* 0 */ "white",
/* 1 */ "black",
/* 2 */ "blue",
/* 3 */ "green",
/* 4 */ "lightred",
/* 5 */ "red",
/* 6 */ "magenta",
/* 7 */ "brown",
/* 8 */ "yellow",
/* 9 */ "lightgreen",
/* 10 */ "cyan",
/* 11 */ "lightcyan",
/* 12 */ "lightblue",
/* 13 */ "lightmagenta",
/* 14 */ "darkgray",
/* 15 */ "gray",
/* 16-23 */ "52", "94", "100", "58", "22", "29", "23", "24",
/* 24-31 */ "17", "54", "53", "89", "88", "130", "142", "64",
/* 32-39 */ "28", "35", "30", "25", "18", "91", "90", "125",
/* 40-47 */ "124", "166", "184", "106", "34", "49", "37", "33",
/* 48-55 */ "19", "129", "127", "161", "196", "208", "226", "154",
/* 56-63 */ "46", "86", "51", "75", "21", "171", "201", "198",
/* 64-71 */ "203", "215", "227", "191", "83", "122", "87", "111",
/* 72-79 */ "63", "177", "207", "205", "217", "223", "229", "193",
/* 80-87 */ "157", "158", "159", "153", "147", "183", "219", "212",
/* 88-95 */ "16", "233", "235", "237", "239", "241", "244", "247",
/* 96-98 */ "250", "254", "231",
/* 99 */ "default",
};
char irc_color_term2irc[IRC_COLOR_TERM2IRC_NUM_COLORS] =
{ /* term > IRC */
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/irc/irc-color.h
Expand Up @@ -20,7 +20,7 @@
#ifndef WEECHAT_IRC_COLOR_H
#define WEECHAT_IRC_COLOR_H 1

#define IRC_NUM_COLORS 16
#define IRC_NUM_COLORS 100

/*
* shift ncurses colors for compatibility with colors
Expand Down

0 comments on commit 9be4bc0

Please sign in to comment.