1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-21 18:36:39 +02:00

api: return value in function command(), remove WeeChat error after command callback if return code is WEECHAT_RC_ERROR

This commit is contained in:
Sébastien Helleu
2014-11-22 08:14:29 +01:00
parent e253a2509a
commit 1ef3237b6b
50 changed files with 668 additions and 562 deletions
+6 -5
View File
@@ -4198,6 +4198,7 @@ static PyObject *
weechat_python_api_command (PyObject *self, PyObject *args)
{
char *buffer, *command;
int rc;
API_FUNC(1, "command", API_RETURN_ERROR);
buffer = NULL;
@@ -4205,12 +4206,12 @@ weechat_python_api_command (PyObject *self, PyObject *args)
if (!PyArg_ParseTuple (args, "ss", &buffer, &command))
API_WRONG_ARGS(API_RETURN_ERROR);
plugin_script_api_command (weechat_python_plugin,
python_current_script,
API_STR2PTR(buffer),
command);
rc = plugin_script_api_command (weechat_python_plugin,
python_current_script,
API_STR2PTR(buffer),
command);
API_RETURN_OK;
API_RETURN_INT(rc);
}
static PyObject *