From 18fd85de7d4ee50ab7410ea5f869f23007d41b7b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 21 Feb 2014 13:37:17 +0100 Subject: python: return WEECHAT_RC_ERROR in command /python if arguments are wrong/missing --- src/plugins/python/weechat-python.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index e4936f3b7..8992e8450 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -959,6 +959,8 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, { weechat_python_unload_all (); } + else + return WEECHAT_RC_ERROR; } else { @@ -1008,13 +1010,7 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, python_quiet = 0; } else - { - weechat_printf (NULL, - weechat_gettext ("%s%s: unknown option for " - "command \"%s\""), - weechat_prefix ("error"), PYTHON_PLUGIN_NAME, - "python"); - } + return WEECHAT_RC_ERROR; } return WEECHAT_RC_OK; -- cgit v1.2.3