1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +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
@@ -4897,6 +4897,7 @@ static VALUE
weechat_ruby_api_command (VALUE class, VALUE buffer, VALUE command)
{
char *c_buffer, *c_command;
int rc;
API_FUNC(1, "command", API_RETURN_ERROR);
if (NIL_P (buffer) || NIL_P (command))
@@ -4908,12 +4909,12 @@ weechat_ruby_api_command (VALUE class, VALUE buffer, VALUE command)
c_buffer = StringValuePtr (buffer);
c_command = StringValuePtr (command);
plugin_script_api_command (weechat_ruby_plugin,
ruby_current_script,
API_STR2PTR(c_buffer),
c_command);
rc = plugin_script_api_command (weechat_ruby_plugin,
ruby_current_script,
API_STR2PTR(c_buffer),
c_command);
API_RETURN_OK;
API_RETURN_INT(rc);
}
static VALUE