degesch: part channel on /buffer close
This commit is contained in:
parent
b486965277
commit
15882dcdf9
|
@ -2622,8 +2622,6 @@ buffer_remove (struct app_context *ctx, struct buffer *buffer)
|
|||
{
|
||||
hard_assert (buffer != ctx->current_buffer);
|
||||
|
||||
// TODO: part from the channel if needed
|
||||
|
||||
input_destroy_buffer (&ctx->input, buffer->input_data);
|
||||
buffer->input_data = NULL;
|
||||
|
||||
|
@ -6091,6 +6089,10 @@ handle_buffer_close (struct app_context *ctx, struct handler_args *a)
|
|||
log_global_error (ctx, "Can't close a server buffer");
|
||||
else
|
||||
{
|
||||
// The user would be unable to recreate the buffer otherwise
|
||||
if (buffer->type == BUFFER_CHANNEL)
|
||||
irc_send (buffer->server, "PART %s", buffer->channel->name);
|
||||
|
||||
if (buffer == ctx->current_buffer)
|
||||
buffer_activate (ctx, buffer_next (ctx, 1));
|
||||
buffer_remove (ctx, buffer);
|
||||
|
|
Loading…
Reference in New Issue