1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

Added new functions and script name completion in script plugins, fixed some bugs in weelist management and script plugins

New functions in script plugins API: gettext, ngettext, list_new, list_add,
list_search, list_casesearch, list_get, list_set, list_next, list_prev,
list_string, list_size, list_remove, list_remove_all, list_free.
This commit is contained in:
Sebastien Helleu
2008-01-16 10:19:25 +01:00
parent e173014aec
commit 697f070725
11 changed files with 2660 additions and 590 deletions
+26 -1
View File
@@ -20,6 +20,10 @@
#undef _
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
@@ -396,6 +400,25 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_OK;
}
/*
* weechat_lua_completion_cb: callback for script completion
*/
int
weechat_lua_completion_cb (void *data, char *completion,
struct t_gui_buffer *buffer,
struct t_weelist *list)
{
/* make C compiler happy */
(void) data;
(void) completion;
(void) buffer;
script_completion (weechat_lua_plugin, list, lua_scripts);
return WEECHAT_RC_OK;
}
/*
* weechat_lua_dump_data_cb: dump Lua plugin data in WeeChat log file
*/
@@ -426,7 +449,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
weechat_lua_plugin = plugin;
script_init (weechat_lua_plugin,
&weechat_lua_command_cb, &weechat_lua_dump_data_cb,
&weechat_lua_command_cb,
&weechat_lua_completion_cb,
&weechat_lua_dump_data_cb,
&weechat_lua_load_cb);
/* init ok */