1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

lua: return WEECHAT_RC_ERROR in command /lua if arguments are wrong/missing

This commit is contained in:
Sebastien Helleu
2014-02-21 13:37:58 +01:00
parent decbaf306d
commit cf827580f5
+3 -6
View File
@@ -644,6 +644,8 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer,
{
weechat_lua_unload_all ();
}
else
return WEECHAT_RC_ERROR;
}
else
{
@@ -693,12 +695,7 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer,
lua_quiet = 0;
}
else
{
weechat_printf (NULL,
weechat_gettext ("%s%s: unknown option for "
"command \"%s\""),
weechat_prefix ("error"), LUA_PLUGIN_NAME, "lua");
}
return WEECHAT_RC_ERROR;
}
return WEECHAT_RC_OK;