mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
fifo: search buffer by full name when text is received in pipe
This commit is contained in:
+2
-16
@@ -233,7 +233,7 @@ fifo_remove ()
|
||||
void
|
||||
fifo_exec (const char *text)
|
||||
{
|
||||
char *text2, *pos_msg, *pos_buffer;
|
||||
char *text2, *pos_msg;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
text2 = strdup (text);
|
||||
@@ -265,21 +265,7 @@ fifo_exec (const char *text)
|
||||
}
|
||||
pos_msg[0] = '\0';
|
||||
pos_msg += 2;
|
||||
|
||||
pos_buffer = strchr (text2, '.');
|
||||
if (!pos_buffer)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%s%s: error, invalid text received on pipe"),
|
||||
weechat_prefix ("error"), FIFO_PLUGIN_NAME);
|
||||
free (text2);
|
||||
return;
|
||||
}
|
||||
pos_buffer[0] = '\0';
|
||||
pos_buffer++;
|
||||
|
||||
if (text2[0] && pos_buffer[0])
|
||||
ptr_buffer = weechat_buffer_search (text2, pos_buffer);
|
||||
ptr_buffer = weechat_buffer_search ("==", text2);
|
||||
}
|
||||
|
||||
if (!ptr_buffer)
|
||||
|
||||
Reference in New Issue
Block a user