summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/lua/weechat-lua.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-03-24 10:59:21 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-03-24 10:59:21 +0100
commitb3c00abbbb7d54062c51685e78be27cecf917672 (patch)
treef0f7255e31c6d512d73e89b0c77191ba891750eb /src/plugins/scripts/lua/weechat-lua.c
parent5d6e3d1a7a6f01488322f7d89e4bf0be532edb0b (diff)
downloadweechat-b3c00abbbb7d54062c51685e78be27cecf917672.zip
api: use a struct for arguments of function script_init (callbacks)
Diffstat (limited to 'src/plugins/scripts/lua/weechat-lua.c')
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 9b4d3bdb2..1890765f1 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -730,19 +730,20 @@ weechat_lua_signal_script_action_cb (void *data, const char *signal,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
+ struct t_plugin_script_init init;
+
weechat_lua_plugin = plugin;
+ init.callback_command = &weechat_lua_command_cb;
+ init.callback_completion = &weechat_lua_completion_cb;
+ init.callback_infolist = &weechat_lua_infolist_cb;
+ init.callback_signal_debug_dump = &weechat_lua_signal_debug_dump_cb;
+ init.callback_signal_buffer_closed = &weechat_lua_signal_buffer_closed_cb;
+ init.callback_signal_script_action = &weechat_lua_signal_script_action_cb;
+ init.callback_load_file = &weechat_lua_load_cb;
+
lua_quiet = 1;
- script_init (weechat_lua_plugin,
- argc,
- argv,
- &weechat_lua_command_cb,
- &weechat_lua_completion_cb,
- &weechat_lua_infolist_cb,
- &weechat_lua_signal_debug_dump_cb,
- &weechat_lua_signal_buffer_closed_cb,
- &weechat_lua_signal_script_action_cb,
- &weechat_lua_load_cb);
+ script_init (weechat_lua_plugin, argc, argv, &init);
lua_quiet = 0;
script_display_short_list (weechat_lua_plugin,