diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-05 07:53:38 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-01-05 07:53:38 +0100 |
commit | fe0c9dbc93815ee380ffe4461aa913269f8bc0b3 (patch) | |
tree | fe661519c3838ef8768578d3197e772b1c4e4b6f /src/plugins | |
parent | 7a55d8aa290ff069955834e8844dab9fe02ade8b (diff) | |
download | weechat-fe0c9dbc93815ee380ffe4461aa913269f8bc0b3.zip |
trigger: add info in error messages
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/trigger/trigger-command.c | 21 | ||||
-rw-r--r-- | src/plugins/trigger/trigger.c | 2 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c index 1a8394e7f..602b82f5b 100644 --- a/src/plugins/trigger/trigger-command.c +++ b/src/plugins/trigger/trigger-command.c @@ -405,8 +405,9 @@ trigger_command_rename (struct t_trigger *trigger, const char *new_name) if (!trigger_name_valid (name2)) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid name for trigger"), - weechat_prefix ("error"), TRIGGER_PLUGIN_NAME); + _("%s%s: invalid trigger name: \"%s\""), + weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, + name2); goto end; } /* check that no trigger already exists with the new name */ @@ -496,15 +497,16 @@ trigger_command_trigger (void *data, struct t_gui_buffer *buffer, int argc, if (!trigger_name_valid (sargv[0])) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid name for trigger"), - weechat_prefix ("error"), TRIGGER_PLUGIN_NAME); + _("%s%s: invalid trigger name: \"%s\""), + weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, + sargv[0]); goto end; } type = trigger_search_hook_type (sargv[1]); if (type < 0) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid hook type \"%s\""), + _("%s%s: invalid hook type: \"%s\""), weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, sargv[1]); goto end; @@ -548,7 +550,7 @@ trigger_command_trigger (void *data, struct t_gui_buffer *buffer, int argc, && (trigger_search_return_code (sargv[6]) < 0)) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid return code \"%s\""), + _("%s%s: invalid return code: \"%s\""), weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, sargv[6]); goto end; @@ -622,7 +624,7 @@ trigger_command_trigger (void *data, struct t_gui_buffer *buffer, int argc, if (type < 0) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid hook type \"%s\""), + _("%s%s: invalid hook type: \"%s\""), weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, argv[2]); goto end; @@ -783,8 +785,9 @@ trigger_command_trigger (void *data, struct t_gui_buffer *buffer, int argc, if (!trigger_name_valid (argv[3])) { weechat_printf_tags (NULL, "no_trigger", - _("%s%s: invalid name for trigger"), - weechat_prefix ("error"), TRIGGER_PLUGIN_NAME); + _("%s%s: invalid trigger name: \"%s\""), + weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, + argv[3]); goto end; } /* check that no trigger already exists with the new name */ diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index 62d91a545..0c4f121d0 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -848,7 +848,7 @@ trigger_new_with_options (const char *name, struct t_config_option **options) &new_trigger->regex) < 0) { weechat_printf (NULL, - _("%s%s: invalid regular expression in trigger " + _("%s%s: invalid regular expression in trigger: " "\"%s\""), weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, name); |