1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

IRC DCC chat and file (without resume) reintroduced, via xfer plugin (called by /dcc command)

This commit is contained in:
Sebastien Helleu
2008-05-06 16:51:30 +02:00
parent e7a16efa0c
commit e9603acb1a
37 changed files with 2155 additions and 1271 deletions
+37
View File
@@ -3290,6 +3290,42 @@ weechat_lua_api_buffer_search (lua_State *L)
LUA_RETURN_STRING_FREE(result);
}
/*
* weechat_lua_api_buffer_clear: clear a buffer
*/
static int
weechat_lua_api_buffer_clear (lua_State *L)
{
const char *buffer;
int n;
/* make C compiler happy */
(void) L;
if (!lua_current_script)
{
WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("buffer_clear");
LUA_RETURN_ERROR;
}
buffer = NULL;
n = lua_gettop (lua_current_interpreter);
if (n < 1)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_clear");
LUA_RETURN_ERROR;
}
buffer = lua_tostring (lua_current_interpreter, -1);
weechat_buffer_clear (script_str2ptr ((char *)buffer));
LUA_RETURN_OK;
}
/*
* weechat_lua_api_buffer_close: close a buffer
*/
@@ -4794,6 +4830,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = {
{ "unhook_all", &weechat_lua_api_unhook_all },
{ "buffer_new", &weechat_lua_api_buffer_new },
{ "buffer_search", &weechat_lua_api_buffer_search },
{ "buffer_clear", &weechat_lua_api_buffer_clear },
{ "buffer_close", &weechat_lua_api_buffer_close },
{ "buffer_get_string", &weechat_lua_api_buffer_get_string },
{ "buffer_get_pointer", &weechat_lua_api_buffer_get_pointer },