summaryrefslogtreecommitdiff
path: root/src/plugins/python/weechat-python.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:17 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:17 +0100
commit18fd85de7d4ee50ab7410ea5f869f23007d41b7b (patch)
tree04e4a8fa964c8b13c1d9220f13ccc0fcad66332e /src/plugins/python/weechat-python.c
parent2dbcffc93e3e9809dda407c65f665a3b93e22750 (diff)
downloadweechat-18fd85de7d4ee50ab7410ea5f869f23007d41b7b.zip
python: return WEECHAT_RC_ERROR in command /python if arguments are wrong/missing
Diffstat (limited to 'src/plugins/python/weechat-python.c')
-rw-r--r--src/plugins/python/weechat-python.c10
1 files changed, 3 insertions, 7 deletions
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;