summaryrefslogtreecommitdiff
path: root/src/plugins/tcl/weechat-tcl.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:38:11 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:38:11 +0100
commit9e2e59c3e18d54b2867af2a5d603e31b69c426b3 (patch)
tree79ea3db421c348de221e150ee9439a411e7360d4 /src/plugins/tcl/weechat-tcl.c
parentcf827580f516f18e0c0d0ef0f379a6c62cf9f8bb (diff)
downloadweechat-9e2e59c3e18d54b2867af2a5d603e31b69c426b3.zip
tcl: return WEECHAT_RC_ERROR in command /tcl if arguments are wrong/missing
Diffstat (limited to 'src/plugins/tcl/weechat-tcl.c')
-rw-r--r--src/plugins/tcl/weechat-tcl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c
index c3dcad7d0..4fe36cfdd 100644
--- a/src/plugins/tcl/weechat-tcl.c
+++ b/src/plugins/tcl/weechat-tcl.c
@@ -549,6 +549,8 @@ weechat_tcl_command_cb (void *data, struct t_gui_buffer *buffer,
{
weechat_tcl_unload_all ();
}
+ else
+ return WEECHAT_RC_ERROR;
}
else
{
@@ -598,12 +600,7 @@ weechat_tcl_command_cb (void *data, struct t_gui_buffer *buffer,
tcl_quiet = 0;
}
else
- {
- weechat_printf (NULL,
- weechat_gettext ("%s%s: unknown option for "
- "command \"%s\""),
- weechat_prefix ("error"), TCL_PLUGIN_NAME, "tcl");
- }
+ return WEECHAT_RC_ERROR;
}
return WEECHAT_RC_OK;