summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/lua
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-08-08 08:19:04 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-08-08 08:19:04 +0000
commitf68a2cbfcdb6d948b503274518144890d092a56a (patch)
tree349dcc21e4574b7ed661e4b7b58283414e69e44d /src/plugins/scripts/lua
parent3c10d2205e3ffbd821b4490e454c6f4d32e16e5d (diff)
downloadweechat-f68a2cbfcdb6d948b503274518144890d092a56a.zip
Added "copy" and "rename" options to /server command
Diffstat (limited to 'src/plugins/scripts/lua')
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index cbdb03734..15ee43e95 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -1672,8 +1672,8 @@ weechat_lua_get_server_info (lua_State *L)
lua_pushnumber (lua_current_interpreter, ptr_server->autoreconnect_delay);
lua_rawset (lua_current_interpreter, -3);
- lua_pushstring (lua_current_interpreter, "command_line");
- lua_pushnumber (lua_current_interpreter, ptr_server->command_line);
+ lua_pushstring (lua_current_interpreter, "temp_server");
+ lua_pushnumber (lua_current_interpreter, ptr_server->temp_server);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "address");
@@ -1973,7 +1973,7 @@ weechat_lua_get_irc_color (lua_State *L)
static int
weechat_lua_get_window_info (lua_State *L)
{
- t_plugin_window_info *window_info, *ptr_window;
+ t_plugin_window_info *window_info, *ptr_win;
int i;
/* make C compiler happy */
@@ -1997,40 +1997,43 @@ weechat_lua_get_window_info (lua_State *L)
lua_newtable (lua_current_interpreter);
- for (i = 0, ptr_window = window_info; ptr_window; ptr_window = ptr_window->next_window, i++)
+ i = 0;
+ for (ptr_win = window_info; ptr_win; ptr_win = ptr_win->next_window)
{
lua_pushnumber (lua_current_interpreter, i);
lua_newtable (lua_current_interpreter);
lua_pushstring (lua_current_interpreter, "num_buffer");
- lua_pushnumber (lua_current_interpreter, ptr_window->num_buffer);
+ lua_pushnumber (lua_current_interpreter, ptr_win->num_buffer);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_x");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_x);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_x);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_y");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_y);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_y);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_width");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_width);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_width);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_height");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_height);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_height);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_width_pct");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_width_pct);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_width_pct);
lua_rawset (lua_current_interpreter, -3);
lua_pushstring (lua_current_interpreter, "win_height_pct");
- lua_pushnumber (lua_current_interpreter, ptr_window->win_height_pct);
+ lua_pushnumber (lua_current_interpreter, ptr_win->win_height_pct);
lua_rawset (lua_current_interpreter, -3);
lua_rawset (lua_current_interpreter, -3);
+
+ i++;
}
lua_plugin->free_window_info (lua_plugin, window_info);