diff options
author | Emmanuel Bouthenot <kolter@openics.org> | 2006-08-26 21:18:10 +0000 |
---|---|---|
committer | Emmanuel Bouthenot <kolter@openics.org> | 2006-08-26 21:18:10 +0000 |
commit | 9905ee774b315f1da4e03c8c32a3f29d4224c1a8 (patch) | |
tree | 4a294cb180a5e63c92ce3e53f50f0dfde63ad116 /src/plugins | |
parent | 56ebcb53ebbe9c1413c492de2af6c6c4391ece20 (diff) | |
download | weechat-9905ee774b315f1da4e03c8c32a3f29d4224c1a8.zip |
fix bugs in get_buffer_data() which breaks the retrieval of buffer content (perl, lua)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua.c | 6 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 4d70d61f0..b8d14cc85 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -1767,8 +1767,8 @@ weechat_lua_get_buffer_data (lua_State *L) server = lua_tostring (lua_current_interpreter, -1); break; case 2: - channel = lua_tostring (lua_current_interpreter, -2); - server = lua_tostring (lua_current_interpreter, -1); + server = lua_tostring (lua_current_interpreter, -2); + channel = lua_tostring (lua_current_interpreter, -1); break; default: lua_plugin->print_server (lua_plugin, @@ -1777,7 +1777,7 @@ weechat_lua_get_buffer_data (lua_State *L) lua_pushnumber (lua_current_interpreter, 0); return 1; } - + buffer_data = lua_plugin->get_buffer_data (lua_plugin, (char *) server, (char *) channel); if (!buffer_data) { diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 599d5754f..596a1126e 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -1531,6 +1531,8 @@ static XS (XS_weechat_get_buffer_data) server = SvPV (ST (0), PL_na); if (items >= 2) channel = SvPV (ST (1), PL_na); + + SP -= items; buffer_data = perl_plugin->get_buffer_data (perl_plugin, server, channel); count = 0; |