int escape_vars)
{
SERVER_REC *server;
- WI_ITEM_REC *wiitem;
- char *tmpstr, *tmpstr2;
+ WI_ITEM_REC *wiitem;
+ char *tmpstr, *tmpstr2;
int len;
if (str == NULL)
server = NULL;
wiitem = NULL;
} else {
- server = active_win->active_server;
- wiitem = active_win->active;
+ server = active_win->active_server != NULL ?
+ active_win->active_server : active_win->connect_server;
+ wiitem = active_win->active;
}
/* expand templates */