diff options
Diffstat (limited to 'src/plugins/plugin-api.c')
-rw-r--r-- | src/plugins/plugin-api.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 9001716ab..12d681565 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -352,8 +352,8 @@ plugin_api_command (struct t_weechat_plugin *plugin, } /* - * Modifier to decode ANSI colors: convert ANSI color codes to WeeChat colors - * (or removes them) + * Modifier callback: decodes ANSI colors: converts ANSI color codes to WeeChat + * colors (or removes them). */ char * @@ -374,7 +374,8 @@ plugin_api_modifier_color_decode_ansi_cb (const void *pointer, void *data, } /* - * Modifier to encode ANSI colors: convert WeeChat colors to ANSI color codes + * Modifier callback: encodes ANSI colors: converts WeeChat colors to ANSI + * color codes. */ char * @@ -393,6 +394,25 @@ plugin_api_modifier_color_encode_ansi_cb (const void *pointer, void *data, } /* + * Modifier callback: evaluates a home path. + */ + +char * +plugin_api_modifier_eval_path_home_cb (const void *pointer, void *data, + const char *modifier, + const char *modifier_data, + const char *string) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) modifier; + (void) modifier_data; + + return string_eval_path_home (string, NULL, NULL, NULL); +} + +/* * Moves item pointer to next item in an infolist. * * Returns: @@ -543,6 +563,8 @@ plugin_api_init () &plugin_api_modifier_color_decode_ansi_cb, NULL, NULL); hook_modifier (NULL, "color_encode_ansi", &plugin_api_modifier_color_encode_ansi_cb, NULL, NULL); + hook_modifier (NULL, "eval_path_home", + &plugin_api_modifier_eval_path_home_cb, NULL, NULL); /* WeeChat core info/infolist hooks */ plugin_api_info_init (); |