summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:58 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:58 +0100
commitcf827580f516f18e0c0d0ef0f379a6c62cf9f8bb (patch)
tree9e0cfec341eff0b99928d6b0131b4dab89dc71e1 /src
parentdecbaf306d03aaaba9da2e74442e869eddb1cb6c (diff)
downloadweechat-cf827580f516f18e0c0d0ef0f379a6c62cf9f8bb.zip
lua: return WEECHAT_RC_ERROR in command /lua if arguments are wrong/missing
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/weechat-lua.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c
index 8a6acea57..7f3b5ae3f 100644
--- a/src/plugins/lua/weechat-lua.c
+++ b/src/plugins/lua/weechat-lua.c
@@ -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;