summaryrefslogtreecommitdiff
path: root/src/plugins/trigger/trigger-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-28 11:48:59 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-28 11:48:59 +0100
commit13b0a88f211dbcc9277b31c303fd538e35019ad9 (patch)
tree4de25d04d8f35ba01ddb77c759c74d1775225cca /src/plugins/trigger/trigger-command.c
parent02dcc3cb691d216c569520b92aa2081914d1cf20 (diff)
downloadweechat-13b0a88f211dbcc9277b31c303fd538e35019ad9.zip
trigger: allow empty return code in command /trigger {add|addoff|addreplace}
Diffstat (limited to 'src/plugins/trigger/trigger-command.c')
-rw-r--r--src/plugins/trigger/trigger-command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c
index 38dd78d3a..315757f9d 100644
--- a/src/plugins/trigger/trigger-command.c
+++ b/src/plugins/trigger/trigger-command.c
@@ -484,7 +484,8 @@ trigger_command_trigger (void *data, struct t_gui_buffer *buffer, int argc,
weechat_prefix ("error"), sargv[1]);
goto end;
}
- if ((sargc > 6) && (trigger_search_return_code (sargv[6]) < 0))
+ if ((sargc > 6) && sargv[6][0]
+ && (trigger_search_return_code (sargv[6]) < 0))
{
weechat_printf_tags (NULL, "no_trigger",
_("%sError: invalid return code \"%s\""),