mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 09:13:14 +02:00
core: don't execute command scheduled by /wait if the buffer does not exist any more
This commit is contained in:
@@ -8126,10 +8126,9 @@ command_init ()
|
||||
"command: command to execute (or text to send to buffer if command "
|
||||
"does not start with '/')\n"
|
||||
"\n"
|
||||
"Note: command is executed on buffer where /wait was executed (if "
|
||||
"buffer is not found (for example if it has been closed before "
|
||||
"execution of command), then command is executed on WeeChat core "
|
||||
"buffer).\n"
|
||||
"Note: the command is executed on buffer where /wait was executed "
|
||||
"(if the buffer does not exist any more, the command is not "
|
||||
"executed).\n"
|
||||
"\n"
|
||||
"Examples:\n"
|
||||
" join channel in 10 seconds:\n"
|
||||
|
||||
@@ -374,12 +374,7 @@ input_data_timer_cb (const void *pointer, void *data, int remaining_calls)
|
||||
|
||||
if (timer_args[0] && timer_args[1])
|
||||
{
|
||||
/* search buffer, fallback to core buffer if not found */
|
||||
ptr_buffer = gui_buffer_search_by_full_name (timer_args[0]);
|
||||
if (!ptr_buffer)
|
||||
ptr_buffer = gui_buffer_search_main ();
|
||||
|
||||
/* execute command */
|
||||
if (ptr_buffer)
|
||||
(void) input_data (ptr_buffer, timer_args[1], timer_args[2]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user