summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-08-25 18:23:44 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-08-25 19:37:47 +0200
commitaac14f28dd7cd7917f772380cd297e1a8bec62c6 (patch)
tree074d09d17790bc7158108268d3e0eae15127defb /src/plugins
parente25c36479061cb20f8f163c28e74540311d85274 (diff)
downloadweechat-aac14f28dd7cd7917f772380cd297e1a8bec62c6.zip
irc: add comments in functions irc_color_decode and irc_color_encode
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-color.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c
index 3919c0466..c7b4019df 100644
--- a/src/plugins/irc/irc-color.c
+++ b/src/plugins/irc/irc-color.c
@@ -178,6 +178,7 @@ irc_color_decode (const char *string, int keep_colors)
str_bg[0] = '\0';
if (isdigit (ptr_string[0]))
{
+ /* foreground */
str_fg[0] = ptr_string[0];
str_fg[1] = '\0';
ptr_string++;
@@ -190,6 +191,7 @@ irc_color_decode (const char *string, int keep_colors)
}
if ((ptr_string[0] == ',') && (isdigit (ptr_string[1])))
{
+ /* background */
ptr_string++;
str_bg[0] = ptr_string[0];
str_bg[1] = '\0';
@@ -315,6 +317,7 @@ irc_color_encode (const char *string, int keep_colors)
ptr_string++;
if (isdigit (ptr_string[0]))
{
+ /* foreground */
if (keep_colors)
{
weechat_string_dyn_concat (out,
@@ -336,6 +339,7 @@ irc_color_encode (const char *string, int keep_colors)
}
if (ptr_string[0] == ',')
{
+ /* background */
if (keep_colors)
weechat_string_dyn_concat (out, ",", -1);
ptr_string++;