summaryrefslogtreecommitdiff
path: root/src/plugins/rmodifier/rmodifier-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:39:26 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:39:26 +0100
commit078f549c4a3b625e18f296236c1a3f18e139c1ca (patch)
treed2648cb0c5d7d96169e61947109e32192fad7f81 /src/plugins/rmodifier/rmodifier-command.c
parenteb26e13814124f608044e25188e491e037651935 (diff)
downloadweechat-078f549c4a3b625e18f296236c1a3f18e139c1ca.zip
rmodifier: return WEECHAT_RC_ERROR in command /rmodifier if arguments are wrong/missing
Diffstat (limited to 'src/plugins/rmodifier/rmodifier-command.c')
-rw-r--r--src/plugins/rmodifier/rmodifier-command.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c
index 753a84f44..8aeb7c260 100644
--- a/src/plugins/rmodifier/rmodifier-command.c
+++ b/src/plugins/rmodifier/rmodifier-command.c
@@ -121,13 +121,7 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
if (weechat_strcasecmp (argv[1], "add") == 0)
{
if (argc < 6)
- {
- weechat_printf (NULL,
- _("%sError: missing arguments for \"%s\" "
- "command"),
- weechat_prefix ("error"), "rmodifier");
- return WEECHAT_RC_OK;
- }
+ return WEECHAT_RC_ERROR;
ptr_rmodifier = rmodifier_new (argv[2], argv[3], argv_eol[5], argv[4]);
if (!ptr_rmodifier)
{
@@ -158,13 +152,7 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
if (weechat_strcasecmp (argv[1], "del") == 0)
{
if (argc < 3)
- {
- weechat_printf (NULL,
- _("%sError: missing arguments for \"%s\" "
- "command"),
- weechat_prefix ("error"), "rmodifier");
- return WEECHAT_RC_OK;
- }
+ return WEECHAT_RC_ERROR;
if (weechat_strcasecmp (argv[2], "-all") == 0)
{
count = rmodifier_count;
@@ -230,7 +218,7 @@ rmodifier_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
- return WEECHAT_RC_OK;
+ return WEECHAT_RC_ERROR;
}
/*