From 184700e597f7374146ba0c0ca6932f83d8d6add2 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 1 Feb 2008 18:56:12 +0100 Subject: New "close callback" for buffers, use of this callback in IRC plugin to leave channel or disconnect from server when buffer is closed --- src/plugins/irc/irc-channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/irc/irc-channel.c') diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index bfb825854..ae2c409c0 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -30,6 +30,7 @@ #include "../weechat-plugin.h" #include "irc.h" #include "irc-channel.h" +#include "irc-buffer.h" #include "irc-config.h" #include "irc-dcc.h" #include "irc-nick.h" @@ -60,7 +61,8 @@ irc_channel_new (struct t_irc_server *server, int channel_type, /* create buffer for channel */ new_buffer = weechat_buffer_new (server->name, channel_name, - &irc_input_data, NULL); + &irc_input_data_cb, NULL, + &irc_buffer_close_cb, NULL); if (!new_buffer) { free (new_channel); -- cgit v1.2.3