mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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:
parent
13712d83b2
commit
a2a6c7e293
2 changed files with 44 additions and 16 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue