From 9eb1422bb764342a6fde7e38595db940be33a04d Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 16 Jun 2005 11:02:19 +0000 Subject: Fixed plugins "print" and "prnt" functions: now ok for writing on server buffers --- src/plugins/plugins.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index aa35bbc36..7a7f194d7 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -424,9 +424,17 @@ plugin_find_buffer (char *server, char *channel) } else { - ptr_buffer = gui_current_window->buffer; - if (ptr_buffer->dcc) - ptr_buffer = gui_buffers; + if (!channel) + { + ptr_buffer = gui_current_window->buffer; + if (ptr_buffer->dcc) + ptr_buffer = gui_buffers; + } + else + { + if (ptr_server) + ptr_buffer = ptr_server->buffer; + } } if (!ptr_buffer) -- cgit v1.2.3