buffer: Remove the buffer from the server buffer list if it has been closed.

This commit is contained in:
Damir Jelić 2018-10-14 11:56:47 +02:00
parent c26e30848f
commit d66621578b

View file

@ -101,7 +101,15 @@ def room_buffer_input_cb(server_name, buffer, input_data):
@utf8_decode
def room_buffer_close_cb(data, buffer):
def room_buffer_close_cb(server_name, buffer):
server = SERVERS[server_name]
room_buffer = server.find_room_from_ptr(buffer)
if room_buffer:
room_id = room_buffer.room.room_id
server.buffers.pop(room_id, None)
server.room_buffers.pop(room_id, None)
return W.WEECHAT_RC_OK