mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
Add new functions in plugin API to get/set nicks/groups properties in nicklist
8 new functions added: - nicklist_group_get_integer - nicklist_group_get_string - nicklist_group_get_pointer - nicklist_group_set - nicklist_nick_get_integer - nicklist_nick_get_string - nicklist_nick_get_pointer - nicklist_nick_set
This commit is contained in:
@@ -189,7 +189,7 @@ weechat_lua_api_charset_set (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "charset_set");
|
||||
@@ -618,7 +618,7 @@ weechat_lua_api_mkdir_home (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir_home");
|
||||
@@ -657,7 +657,7 @@ weechat_lua_api_mkdir (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir");
|
||||
@@ -697,7 +697,7 @@ weechat_lua_api_mkdir_parents (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir_parents");
|
||||
@@ -3315,7 +3315,7 @@ weechat_lua_api_hook_command (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_command");
|
||||
@@ -3415,7 +3415,7 @@ weechat_lua_api_hook_command_run (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_command_run");
|
||||
@@ -3502,7 +3502,7 @@ weechat_lua_api_hook_timer (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_timer");
|
||||
@@ -3594,7 +3594,7 @@ weechat_lua_api_hook_fd (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_fd");
|
||||
@@ -3694,7 +3694,7 @@ weechat_lua_api_hook_process (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_process");
|
||||
@@ -3788,7 +3788,7 @@ weechat_lua_api_hook_connect (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_connect");
|
||||
@@ -3916,7 +3916,7 @@ weechat_lua_api_hook_print (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_print");
|
||||
@@ -4031,7 +4031,7 @@ weechat_lua_api_hook_signal (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_signal");
|
||||
@@ -4076,7 +4076,7 @@ weechat_lua_api_hook_signal_send (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_signal_send");
|
||||
@@ -4174,7 +4174,7 @@ weechat_lua_api_hook_hsignal (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_hsignal");
|
||||
@@ -4220,7 +4220,7 @@ weechat_lua_api_hook_hsignal_send (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_hsignal_send");
|
||||
@@ -4396,7 +4396,7 @@ weechat_lua_api_hook_completion (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_completion");
|
||||
@@ -4444,7 +4444,7 @@ weechat_lua_api_hook_completion_list_add (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_completion_list_add");
|
||||
@@ -4521,7 +4521,7 @@ weechat_lua_api_hook_modifier (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_modifier");
|
||||
@@ -4567,7 +4567,7 @@ weechat_lua_api_hook_modifier_exec (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_modifier_exec");
|
||||
@@ -4637,7 +4637,7 @@ weechat_lua_api_hook_info (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_info");
|
||||
@@ -4719,7 +4719,7 @@ weechat_lua_api_hook_info_hashtable (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_info_hashtable");
|
||||
@@ -4811,7 +4811,7 @@ weechat_lua_api_hook_infolist (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_infolist");
|
||||
@@ -4865,7 +4865,7 @@ weechat_lua_api_unhook (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "unhook");
|
||||
@@ -5008,7 +5008,7 @@ weechat_lua_api_buffer_new (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_new");
|
||||
@@ -5181,7 +5181,7 @@ weechat_lua_api_buffer_close (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_close");
|
||||
@@ -5297,7 +5297,7 @@ weechat_lua_api_buffer_get_integer (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_integer");
|
||||
@@ -5336,7 +5336,7 @@ weechat_lua_api_buffer_get_string (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_string");
|
||||
@@ -5376,7 +5376,7 @@ weechat_lua_api_buffer_get_pointer (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_pointer");
|
||||
@@ -5415,7 +5415,7 @@ weechat_lua_api_buffer_set (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_set");
|
||||
@@ -5517,7 +5517,7 @@ weechat_lua_api_window_get_integer (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_integer");
|
||||
@@ -5556,7 +5556,7 @@ weechat_lua_api_window_get_string (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_string");
|
||||
@@ -5596,7 +5596,7 @@ weechat_lua_api_window_get_pointer (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_pointer");
|
||||
@@ -5635,7 +5635,7 @@ weechat_lua_api_window_set_title (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_set_title");
|
||||
@@ -5672,7 +5672,7 @@ weechat_lua_api_nicklist_add_group (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_add_group");
|
||||
@@ -5721,7 +5721,7 @@ weechat_lua_api_nicklist_search_group (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_search_group");
|
||||
@@ -5764,7 +5764,7 @@ weechat_lua_api_nicklist_add_nick (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_add_nick");
|
||||
@@ -5819,7 +5819,7 @@ weechat_lua_api_nicklist_search_nick (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_search_nick");
|
||||
@@ -5861,7 +5861,7 @@ weechat_lua_api_nicklist_remove_group (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_group");
|
||||
@@ -5900,7 +5900,7 @@ weechat_lua_api_nicklist_remove_nick (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_nick");
|
||||
@@ -5939,7 +5939,7 @@ weechat_lua_api_nicklist_remove_all (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_all");
|
||||
@@ -5963,6 +5963,350 @@ weechat_lua_api_nicklist_remove_all (lua_State *L)
|
||||
LUA_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_group_get_integer: get a group property as integer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_group_get_integer (lua_State *L)
|
||||
{
|
||||
const char *buffer, *group, *property;
|
||||
int n, value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
LUA_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
LUA_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
group = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
value = weechat_nicklist_group_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
LUA_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_group_get_string: get a group property as string
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_group_get_string (lua_State *L)
|
||||
{
|
||||
const char *buffer, *group, *property, *result;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
group = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
result = weechat_nicklist_group_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
LUA_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_group_get_pointer: get a group property as pointer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_group_get_pointer (lua_State *L)
|
||||
{
|
||||
const char *buffer, *group, *property;
|
||||
char *result;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
group = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_group_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property));
|
||||
|
||||
LUA_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_group_set: set a group property
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_group_set (lua_State *L)
|
||||
{
|
||||
const char *buffer, *group, *property, *value;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
LUA_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
value = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -4);
|
||||
group = lua_tostring (lua_current_interpreter, -3);
|
||||
property = lua_tostring (lua_current_interpreter, -2);
|
||||
value = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
weechat_nicklist_group_set (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property,
|
||||
value);
|
||||
|
||||
LUA_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_nick_get_integer: get a nick property as integer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_nick_get_integer (lua_State *L)
|
||||
{
|
||||
const char *buffer, *nick, *property;
|
||||
int n, value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
LUA_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
LUA_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
nick = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
value = weechat_nicklist_nick_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
LUA_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_nick_get_string: get a nick property as string
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_nick_get_string (lua_State *L)
|
||||
{
|
||||
const char *buffer, *nick, *property, *result;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
nick = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
result = weechat_nicklist_nick_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
LUA_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_nick_get_pointer: get a nick property as pointer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_nick_get_pointer (lua_State *L)
|
||||
{
|
||||
const char *buffer, *nick, *property;
|
||||
char *result;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -3);
|
||||
nick = lua_tostring (lua_current_interpreter, -2);
|
||||
property = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_nick_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property));
|
||||
|
||||
LUA_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_nicklist_nick_set: set a nick property
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_lua_api_nicklist_nick_set (lua_State *L)
|
||||
{
|
||||
const char *buffer, *nick, *property, *value;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
LUA_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
value = NULL;
|
||||
|
||||
n = lua_gettop (lua_current_interpreter);
|
||||
|
||||
if (n < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
LUA_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = lua_tostring (lua_current_interpreter, -4);
|
||||
nick = lua_tostring (lua_current_interpreter, -3);
|
||||
property = lua_tostring (lua_current_interpreter, -2);
|
||||
value = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
weechat_nicklist_nick_set (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property,
|
||||
value);
|
||||
|
||||
LUA_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_lua_api_bar_item_search: search a bar item
|
||||
*/
|
||||
@@ -5976,7 +6320,7 @@ weechat_lua_api_bar_item_search (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_search");
|
||||
@@ -6049,7 +6393,7 @@ weechat_lua_api_bar_item_new (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_new");
|
||||
@@ -6169,7 +6513,7 @@ weechat_lua_api_bar_search (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_search");
|
||||
@@ -6208,7 +6552,7 @@ weechat_lua_api_bar_new (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_new");
|
||||
@@ -6286,7 +6630,7 @@ weechat_lua_api_bar_set (lua_State *L)
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
|
||||
|
||||
if (!lua_current_script || !lua_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_set");
|
||||
@@ -7849,6 +8193,14 @@ const struct luaL_reg weechat_lua_api_funcs[] = {
|
||||
{ "nicklist_remove_group", &weechat_lua_api_nicklist_remove_group },
|
||||
{ "nicklist_remove_nick", &weechat_lua_api_nicklist_remove_nick },
|
||||
{ "nicklist_remove_all", &weechat_lua_api_nicklist_remove_all },
|
||||
{ "nicklist_group_get_integer", &weechat_lua_api_nicklist_group_get_integer },
|
||||
{ "nicklist_group_get_string", &weechat_lua_api_nicklist_group_get_string },
|
||||
{ "nicklist_group_get_pointer", &weechat_lua_api_nicklist_group_get_pointer },
|
||||
{ "nicklist_group_set", &weechat_lua_api_nicklist_group_set },
|
||||
{ "nicklist_nick_get_integer", &weechat_lua_api_nicklist_nick_get_integer },
|
||||
{ "nicklist_nick_get_string", &weechat_lua_api_nicklist_nick_get_string },
|
||||
{ "nicklist_nick_get_pointer", &weechat_lua_api_nicklist_nick_get_pointer },
|
||||
{ "nicklist_nick_set", &weechat_lua_api_nicklist_nick_set },
|
||||
{ "bar_item_search", &weechat_lua_api_bar_item_search },
|
||||
{ "bar_item_new", &weechat_lua_api_bar_item_new },
|
||||
{ "bar_item_update", &weechat_lua_api_bar_item_update },
|
||||
|
||||
@@ -5060,6 +5060,294 @@ XS (XS_weechat_api_nicklist_remove_all)
|
||||
PERL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_group_get_integer: get a group property as integer
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_group_get_integer)
|
||||
{
|
||||
char *buffer, *group, *property;
|
||||
int value;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
PERL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
PERL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
group = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
value = weechat_nicklist_group_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
PERL_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_group_get_string: get a group property as string
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_group_get_string)
|
||||
{
|
||||
char *buffer, *group, *property;
|
||||
const char *result;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
group = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
result = weechat_nicklist_group_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
PERL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_group_get_pointer: get a group property as pointer
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_group_get_pointer)
|
||||
{
|
||||
char *result, *buffer, *group, *property;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
group = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_group_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property));
|
||||
|
||||
PERL_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_group_set: set a group property
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_group_set)
|
||||
{
|
||||
char *buffer, *group, *property, *value;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
PERL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (items < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
PERL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
group = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
value = SvPV (ST (3), PL_na);
|
||||
|
||||
weechat_nicklist_group_set (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property,
|
||||
value);
|
||||
|
||||
PERL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_nick_get_integer: get a nick property as integer
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_nick_get_integer)
|
||||
{
|
||||
char *buffer, *nick, *property;
|
||||
int value;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
PERL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
PERL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
nick = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
value = weechat_nicklist_nick_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
PERL_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_nick_get_string: get a nick property as string
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_nick_get_string)
|
||||
{
|
||||
char *buffer, *nick, *property;
|
||||
const char *result;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
nick = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
result = weechat_nicklist_nick_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
PERL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_nick_get_pointer: get a nick property as pointer
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_nick_get_pointer)
|
||||
{
|
||||
char *result, *buffer, *nick, *property;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (items < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
PERL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
nick = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_nick_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property));
|
||||
|
||||
PERL_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::nicklist_nick_set: set a nick property
|
||||
*/
|
||||
|
||||
XS (XS_weechat_api_nicklist_nick_set)
|
||||
{
|
||||
char *buffer, *nick, *property, *value;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) cv;
|
||||
|
||||
if (!perl_current_script || !perl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
PERL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (items < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
PERL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = SvPV (ST (0), PL_na);
|
||||
nick = SvPV (ST (1), PL_na);
|
||||
property = SvPV (ST (2), PL_na);
|
||||
value = SvPV (ST (3), PL_na);
|
||||
|
||||
weechat_nicklist_nick_set (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property,
|
||||
value);
|
||||
|
||||
PERL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::bar_item_search: search a bar item
|
||||
*/
|
||||
@@ -6328,6 +6616,14 @@ weechat_perl_api_init (pTHX)
|
||||
newXS ("weechat::nicklist_remove_group", XS_weechat_api_nicklist_remove_group, "weechat");
|
||||
newXS ("weechat::nicklist_remove_nick", XS_weechat_api_nicklist_remove_nick, "weechat");
|
||||
newXS ("weechat::nicklist_remove_all", XS_weechat_api_nicklist_remove_all, "weechat");
|
||||
newXS ("weechat::nicklist_group_get_integer", XS_weechat_api_nicklist_group_get_integer, "weechat");
|
||||
newXS ("weechat::nicklist_group_get_string", XS_weechat_api_nicklist_group_get_string, "weechat");
|
||||
newXS ("weechat::nicklist_group_get_pointer", XS_weechat_api_nicklist_group_get_pointer, "weechat");
|
||||
newXS ("weechat::nicklist_group_set", XS_weechat_api_nicklist_group_set, "weechat");
|
||||
newXS ("weechat::nicklist_nick_get_integer", XS_weechat_api_nicklist_nick_get_integer, "weechat");
|
||||
newXS ("weechat::nicklist_nick_get_string", XS_weechat_api_nicklist_nick_get_string, "weechat");
|
||||
newXS ("weechat::nicklist_nick_get_pointer", XS_weechat_api_nicklist_nick_get_pointer, "weechat");
|
||||
newXS ("weechat::nicklist_nick_set", XS_weechat_api_nicklist_nick_set, "weechat");
|
||||
newXS ("weechat::bar_item_search", XS_weechat_api_bar_item_search, "weechat");
|
||||
newXS ("weechat::bar_item_new", XS_weechat_api_bar_item_new, "weechat");
|
||||
newXS ("weechat::bar_item_update", XS_weechat_api_bar_item_update, "weechat");
|
||||
|
||||
@@ -5330,6 +5330,296 @@ weechat_python_api_nicklist_remove_all (PyObject *self, PyObject *args)
|
||||
PYTHON_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_group_get_integer get a group property as integer
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_group_get_integer (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *group, *property;
|
||||
int value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
PYTHON_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &group, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
PYTHON_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
value = weechat_nicklist_group_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
PYTHON_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_group_get_string: get a group property as string
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_group_get_string (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *group, *property;
|
||||
const char *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &group, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
result = weechat_nicklist_group_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
PYTHON_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_group_get_pointer: get a group property as pointer
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_group_get_pointer (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *group, *property, *result;
|
||||
PyObject *object;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &group, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_group_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property));
|
||||
|
||||
PYTHON_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_group_set: set a group property
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_group_set (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *group, *property, *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
group = NULL;
|
||||
property = NULL;
|
||||
value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "ssss", &buffer, &group, &property, &value))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
weechat_nicklist_group_set (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property,
|
||||
value);
|
||||
|
||||
PYTHON_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_nick_get_integer get a nick property as integer
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_nick_get_integer (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *nick, *property;
|
||||
int value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
PYTHON_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &nick, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
PYTHON_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
value = weechat_nicklist_nick_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
PYTHON_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_nick_get_string: get a nick property as string
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_nick_get_string (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *nick, *property;
|
||||
const char *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &nick, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
result = weechat_nicklist_nick_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
PYTHON_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_nick_get_pointer: get a nick property as pointer
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_nick_get_pointer (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *nick, *property, *result;
|
||||
PyObject *object;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "sss", &buffer, &nick, &property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
PYTHON_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_nick_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property));
|
||||
|
||||
PYTHON_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_nicklist_nick_set: set a nick property
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
weechat_python_api_nicklist_nick_set (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *buffer, *nick, *property, *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
|
||||
if (!python_current_script || !python_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
nick = NULL;
|
||||
property = NULL;
|
||||
value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "ssss", &buffer, &nick, &property, &value))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
|
||||
weechat_nicklist_nick_set (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property,
|
||||
value);
|
||||
|
||||
PYTHON_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_python_api_bar_item_search: search a bar item
|
||||
*/
|
||||
@@ -6655,6 +6945,14 @@ PyMethodDef weechat_python_funcs[] =
|
||||
{ "nicklist_remove_group", &weechat_python_api_nicklist_remove_group, METH_VARARGS, "" },
|
||||
{ "nicklist_remove_nick", &weechat_python_api_nicklist_remove_nick, METH_VARARGS, "" },
|
||||
{ "nicklist_remove_all", &weechat_python_api_nicklist_remove_all, METH_VARARGS, "" },
|
||||
{ "nicklist_group_get_integer", &weechat_python_api_nicklist_group_get_integer, METH_VARARGS, "" },
|
||||
{ "nicklist_group_get_string", &weechat_python_api_nicklist_group_get_string, METH_VARARGS, "" },
|
||||
{ "nicklist_group_get_pointer", &weechat_python_api_nicklist_group_get_pointer, METH_VARARGS, "" },
|
||||
{ "nicklist_group_set", &weechat_python_api_nicklist_group_set, METH_VARARGS, "" },
|
||||
{ "nicklist_nick_get_integer", &weechat_python_api_nicklist_nick_get_integer, METH_VARARGS, "" },
|
||||
{ "nicklist_nick_get_string", &weechat_python_api_nicklist_nick_get_string, METH_VARARGS, "" },
|
||||
{ "nicklist_nick_get_pointer", &weechat_python_api_nicklist_nick_get_pointer, METH_VARARGS, "" },
|
||||
{ "nicklist_nick_set", &weechat_python_api_nicklist_nick_set, METH_VARARGS, "" },
|
||||
{ "bar_item_search", &weechat_python_api_bar_item_search, METH_VARARGS, "" },
|
||||
{ "bar_item_new", &weechat_python_api_bar_item_new, METH_VARARGS, "" },
|
||||
{ "bar_item_update", &weechat_python_api_bar_item_update, METH_VARARGS, "" },
|
||||
|
||||
@@ -5527,7 +5527,7 @@ weechat_ruby_api_buffer_get_string (VALUE class, VALUE buffer, VALUE property)
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
result = weechat_buffer_get_string (script_str2ptr (c_buffer),
|
||||
c_property);
|
||||
c_property);
|
||||
|
||||
RUBY_RETURN_STRING(result);
|
||||
}
|
||||
@@ -6133,6 +6133,348 @@ weechat_ruby_api_nicklist_remove_all (VALUE class, VALUE buffer)
|
||||
RUBY_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_group_get_integer: get a group property as integer
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_group_get_integer (VALUE class, VALUE buffer,
|
||||
VALUE group, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_group, *c_property;
|
||||
int value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
RUBY_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (group) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
RUBY_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (group, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_group = StringValuePtr (group);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
value = weechat_nicklist_group_get_integer (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_group),
|
||||
c_property);
|
||||
|
||||
RUBY_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_group_get_string: get a group property as string
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_group_get_string (VALUE class, VALUE buffer,
|
||||
VALUE group, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_group, *c_property;
|
||||
const char *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (group) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (group, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_group = StringValuePtr (group);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
result = weechat_nicklist_group_get_string (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_group),
|
||||
c_property);
|
||||
|
||||
RUBY_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_group_get_pointer: get a group property as pointer
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_group_get_pointer (VALUE class, VALUE buffer,
|
||||
VALUE group, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_group, *c_property, *result;
|
||||
VALUE return_value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (group) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (group, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_group = StringValuePtr (group);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_group_get_pointer (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_group),
|
||||
c_property));
|
||||
|
||||
RUBY_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_group_set: set a group property
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_group_set (VALUE class, VALUE buffer, VALUE group,
|
||||
VALUE property, VALUE value)
|
||||
{
|
||||
char *c_buffer, *c_group, *c_property, *c_value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
RUBY_RETURN_ERROR;
|
||||
}
|
||||
|
||||
c_buffer = NULL;
|
||||
c_group = NULL;
|
||||
c_property = NULL;
|
||||
c_value = NULL;
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (group) || NIL_P (property) || NIL_P (value))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
RUBY_RETURN_ERROR;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (group, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
Check_Type (value, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_group = StringValuePtr (group);
|
||||
c_property = StringValuePtr (property);
|
||||
c_value = StringValuePtr (value);
|
||||
|
||||
weechat_nicklist_group_set (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_group),
|
||||
c_property,
|
||||
c_value);
|
||||
|
||||
RUBY_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_nick_get_integer: get a nick property as integer
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_nick_get_integer (VALUE class, VALUE buffer,
|
||||
VALUE nick, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_nick, *c_property;
|
||||
int value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
RUBY_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (nick) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
RUBY_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (nick, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_nick = StringValuePtr (nick);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
value = weechat_nicklist_nick_get_integer (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_nick),
|
||||
c_property);
|
||||
|
||||
RUBY_RETURN_INT(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_nick_get_string: get a nick property as string
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_nick_get_string (VALUE class, VALUE buffer,
|
||||
VALUE nick, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_nick, *c_property;
|
||||
const char *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (nick) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (nick, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_nick = StringValuePtr (nick);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
result = weechat_nicklist_nick_get_string (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_nick),
|
||||
c_property);
|
||||
|
||||
RUBY_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_nick_get_pointer: get a nick property as pointer
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_nick_get_pointer (VALUE class, VALUE buffer,
|
||||
VALUE nick, VALUE property)
|
||||
{
|
||||
char *c_buffer, *c_nick, *c_property, *result;
|
||||
VALUE return_value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (nick) || NIL_P (property))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (nick, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_nick = StringValuePtr (nick);
|
||||
c_property = StringValuePtr (property);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_nick_get_pointer (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_nick),
|
||||
c_property));
|
||||
|
||||
RUBY_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_nicklist_nick_set: set a nick property
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
weechat_ruby_api_nicklist_nick_set (VALUE class, VALUE buffer, VALUE nick,
|
||||
VALUE property, VALUE value)
|
||||
{
|
||||
char *c_buffer, *c_nick, *c_property, *c_value;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
RUBY_RETURN_ERROR;
|
||||
}
|
||||
|
||||
c_buffer = NULL;
|
||||
c_nick = NULL;
|
||||
c_property = NULL;
|
||||
c_value = NULL;
|
||||
|
||||
if (NIL_P (buffer) || NIL_P (nick) || NIL_P (property) || NIL_P (value))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
RUBY_RETURN_ERROR;
|
||||
}
|
||||
|
||||
Check_Type (buffer, T_STRING);
|
||||
Check_Type (nick, T_STRING);
|
||||
Check_Type (property, T_STRING);
|
||||
Check_Type (value, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_nick = StringValuePtr (nick);
|
||||
c_property = StringValuePtr (property);
|
||||
c_value = StringValuePtr (value);
|
||||
|
||||
weechat_nicklist_nick_set (script_str2ptr (c_buffer),
|
||||
script_str2ptr (c_nick),
|
||||
c_property,
|
||||
c_value);
|
||||
|
||||
RUBY_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_ruby_api_bar_item_search: search a bar item
|
||||
*/
|
||||
@@ -7649,6 +7991,14 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_remove_group", &weechat_ruby_api_nicklist_remove_group, 2);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_remove_nick", &weechat_ruby_api_nicklist_remove_nick, 2);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_remove_all", &weechat_ruby_api_nicklist_remove_all, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_integer", &weechat_ruby_api_nicklist_group_get_integer, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_string", &weechat_ruby_api_nicklist_group_get_string, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_pointer", &weechat_ruby_api_nicklist_group_get_pointer, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_group_set", &weechat_ruby_api_nicklist_group_set, 4);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_integer", &weechat_ruby_api_nicklist_nick_get_integer, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_string", &weechat_ruby_api_nicklist_nick_get_string, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_pointer", &weechat_ruby_api_nicklist_nick_get_pointer, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "nicklist_nick_set", &weechat_ruby_api_nicklist_nick_set, 4);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_item_search", &weechat_ruby_api_bar_item_search, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_item_new", &weechat_ruby_api_bar_item_new, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_item_update", &weechat_ruby_api_bar_item_update, 1);
|
||||
|
||||
@@ -5129,7 +5129,7 @@ weechat_tcl_api_buffer_get_pointer (ClientData clientData, Tcl_Interp *interp,
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 2)
|
||||
if (objc < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "buffer_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
@@ -5336,7 +5336,7 @@ weechat_tcl_api_window_get_pointer (ClientData clientData, Tcl_Interp *interp,
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 2)
|
||||
if (objc < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "window_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
@@ -5372,7 +5372,7 @@ weechat_tcl_api_window_set_title (ClientData clientData, Tcl_Interp *interp,
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (objc < 1)
|
||||
if (objc < 2)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "window_set_title");
|
||||
TCL_RETURN_ERROR;
|
||||
@@ -5479,7 +5479,7 @@ weechat_tcl_api_nicklist_add_nick (ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *prefix, *result, *buffer, *group, *name, *color, *prefix_color;
|
||||
char *result, *buffer, *group, *name, *color, *prefix, *prefix_color;
|
||||
int i, visible;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -5662,6 +5662,324 @@ weechat_tcl_api_nicklist_remove_all (ClientData clientData, Tcl_Interp *interp,
|
||||
TCL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_group_get_integer: get a group property as integer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_group_get_integer (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *group, *property;
|
||||
int result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
TCL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_integer");
|
||||
TCL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
group = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = weechat_nicklist_group_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
TCL_RETURN_INT(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_group_get_string: get a group property as string
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_group_get_string (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *group, *property;
|
||||
const char *result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_string");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
group = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = weechat_nicklist_group_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property);
|
||||
|
||||
TCL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_group_get_pointer: get a group property as pointer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_group_get_pointer (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *group, *property, *result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
group = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_group_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property));
|
||||
|
||||
TCL_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_group_set: set a group property
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_group_set (ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *group, *property, *value;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (objc < 5)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_group_set");
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
group = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
value = Tcl_GetStringFromObj (objv[4], &i);
|
||||
|
||||
weechat_nicklist_group_set (script_str2ptr (buffer),
|
||||
script_str2ptr (group),
|
||||
property,
|
||||
value);
|
||||
|
||||
TCL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_nick_get_integer: get a nick property as integer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_nick_get_integer (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *nick, *property;
|
||||
int result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
TCL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_integer");
|
||||
TCL_RETURN_INT(-1);
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
nick = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = weechat_nicklist_nick_get_integer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
TCL_RETURN_INT(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_nick_get_string: get a nick property as string
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_nick_get_string (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *nick, *property;
|
||||
const char *result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_string");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
nick = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = weechat_nicklist_nick_get_string (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property);
|
||||
|
||||
TCL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_nick_get_pointer: get a nick property as pointer
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_nick_get_pointer (ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *nick, *property, *result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_get_pointer");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
nick = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
|
||||
result = script_ptr2str (weechat_nicklist_nick_get_pointer (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property));
|
||||
|
||||
TCL_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_nicklist_nick_set: set a nick property
|
||||
*/
|
||||
|
||||
static int
|
||||
weechat_tcl_api_nicklist_nick_set (ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *buffer, *nick, *property, *value;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (objc < 5)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "nicklist_nick_set");
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
buffer = Tcl_GetStringFromObj (objv[1], &i);
|
||||
nick = Tcl_GetStringFromObj (objv[2], &i);
|
||||
property = Tcl_GetStringFromObj (objv[3], &i);
|
||||
value = Tcl_GetStringFromObj (objv[4], &i);
|
||||
|
||||
weechat_nicklist_nick_set (script_str2ptr (buffer),
|
||||
script_str2ptr (nick),
|
||||
property,
|
||||
value);
|
||||
|
||||
TCL_RETURN_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_tcl_api_bar_item_search: search a bar item
|
||||
*/
|
||||
@@ -6190,7 +6508,7 @@ weechat_tcl_api_infolist_new_item (ClientData clientData, Tcl_Interp *interp,
|
||||
TCL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
if (objc < 1)
|
||||
if (objc < 2)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "infolist_new_item");
|
||||
TCL_RETURN_INT(0);
|
||||
@@ -6223,7 +6541,7 @@ weechat_tcl_api_infolist_new_var_integer (ClientData clientData, Tcl_Interp *int
|
||||
TCL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
if (objc < 3)
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_integer");
|
||||
TCL_RETURN_INT(0);
|
||||
@@ -6264,7 +6582,7 @@ weechat_tcl_api_infolist_new_var_string (ClientData clientData, Tcl_Interp *inte
|
||||
TCL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
if (objc < 3)
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_string");
|
||||
TCL_RETURN_INT(0);
|
||||
@@ -6298,7 +6616,7 @@ weechat_tcl_api_infolist_new_var_pointer (ClientData clientData, Tcl_Interp *int
|
||||
TCL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
if (objc < 3)
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer");
|
||||
TCL_RETURN_INT(0);
|
||||
@@ -6332,7 +6650,7 @@ weechat_tcl_api_infolist_new_var_time (ClientData clientData, Tcl_Interp *interp
|
||||
TCL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
if (objc < 3)
|
||||
if (objc < 4)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_time");
|
||||
TCL_RETURN_INT(0);
|
||||
@@ -7239,6 +7557,22 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
|
||||
weechat_tcl_api_nicklist_remove_nick, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_remove_all",
|
||||
weechat_tcl_api_nicklist_remove_all, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_group_get_integer",
|
||||
weechat_tcl_api_nicklist_group_get_integer, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_group_get_string",
|
||||
weechat_tcl_api_nicklist_group_get_string, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_group_get_pointer",
|
||||
weechat_tcl_api_nicklist_group_get_pointer, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_group_set",
|
||||
weechat_tcl_api_nicklist_group_set, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_nick_get_integer",
|
||||
weechat_tcl_api_nicklist_nick_get_integer, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_nick_get_string",
|
||||
weechat_tcl_api_nicklist_nick_get_string, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_nick_get_pointer",
|
||||
weechat_tcl_api_nicklist_nick_get_pointer, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::nicklist_nick_set",
|
||||
weechat_tcl_api_nicklist_nick_set, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::bar_item_search",
|
||||
weechat_tcl_api_bar_item_search, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
|
||||
Tcl_CreateObjCommand (interp, "weechat::bar_item_new",
|
||||
|
||||
Reference in New Issue
Block a user