summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugin-api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c
index db34f20c9..bab3f4391 100644
--- a/src/plugins/plugin-api.c
+++ b/src/plugins/plugin-api.c
@@ -215,16 +215,16 @@ plugin_api_prefix (const char *prefix)
const char *
plugin_api_color (const char *color_name)
{
- int num_color;
+ const char *str_color;
if (!color_name)
return GUI_NO_COLOR;
/* name is a weechat color option ? => then return this color */
- num_color = gui_color_search_config_int (color_name);
- if (num_color >= 0)
- return GUI_COLOR(num_color);
-
+ str_color = gui_color_search_config (color_name);
+ if (str_color)
+ return str_color;
+
return gui_color_get_custom (color_name);
}