This commit is contained in:
LemonBoy 2017-04-19 05:58:44 +00:00 committed by GitHub
commit ff450a0b9e
4 changed files with 6 additions and 2 deletions

View file

@ -445,6 +445,8 @@ static int server_remove_channels(SERVER_REC *server)
CHANNEL_REC *channel = tmp->data; CHANNEL_REC *channel = tmp->data;
next = tmp->next; next = tmp->next;
/* mark all the channels as parted */
channel->left = TRUE;
channel_destroy(channel); channel_destroy(channel);
found = TRUE; found = TRUE;
} }

View file

@ -217,7 +217,7 @@ void window_destroy(WINDOW_REC *window)
void window_auto_destroy(WINDOW_REC *window) void window_auto_destroy(WINDOW_REC *window)
{ {
if (settings_get_bool("autoclose_windows") && windows->next != NULL && if (settings_get_bool("autoclose_windows") && windows->next != NULL &&
window->items == NULL && window->bound_items == NULL && window->items == NULL && window_bind_has_sticky(window) == FALSE &&
window->level == 0 && !window->immortal) window->level == 0 && !window->immortal)
window_destroy(window); window_destroy(window);
} }

View file

@ -242,7 +242,7 @@ WI_ITEM_REC *window_item_find(void *server, const char *name)
return NULL; return NULL;
} }
static int window_bind_has_sticky(WINDOW_REC *window) int window_bind_has_sticky(WINDOW_REC *window)
{ {
GSList *tmp; GSList *tmp;

View file

@ -28,6 +28,8 @@ WI_ITEM_REC *window_item_find(void *server, const char *name);
WI_ITEM_REC *window_item_find_window(WINDOW_REC *window, WI_ITEM_REC *window_item_find_window(WINDOW_REC *window,
void *server, const char *name); void *server, const char *name);
int window_bind_has_sticky(WINDOW_REC *window);
void window_items_init(void); void window_items_init(void);
void window_items_deinit(void); void window_items_deinit(void);