Make a temporary window bind if you get kicked from channel. Never

allow any window items to go to windows with sticky binds.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1280 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-02-22 05:49:30 +00:00 committed by cras
commit a2a6c7e293
2 changed files with 44 additions and 16 deletions

View file

@ -59,14 +59,20 @@ static void signal_channel_destroyed(CHANNEL_REC *channel)
g_return_if_fail(channel != NULL);
window = window_item_window((WI_ITEM_REC *) channel);
if (window != NULL) {
window_item_destroy((WI_ITEM_REC *) channel);
if (window == NULL)
return;
if (window->items == NULL && windows->next != NULL &&
(!channel->joined || channel->left) &&
settings_get_bool("autoclose_windows")) {
window_destroy(window);
}
window_item_destroy((WI_ITEM_REC *) channel);
if (channel->joined && !channel->left &&
channel->server != NULL) {
/* kicked out from channel */
window_bind_add(window, channel->server->tag,
channel->name);
} else if (settings_get_bool("autoclose_windows") &&
(!channel->joined || channel->left) &&
window->items == NULL && windows->next != NULL) {
window_destroy(window);
}
}