summaryrefslogtreecommitdiff
path: root/src/plugins/script/script-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-06-18 10:37:12 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-07-04 21:57:41 +0200
commitf8116216110504bb5d85ca863189f68617f22188 (patch)
tree8d863fac874b5535a0488aa077f8de4595632713 /src/plugins/script/script-command.c
parent6c8d6eef58603cd3b70d7cc5b7325ee200dd81cf (diff)
downloadweechat-f8116216110504bb5d85ca863189f68617f22188.zip
script: fix buffer used by command `/script list -i|-il|-o|-ol`
The command is now executed on the buffer where it is received instead of the current buffer (in most cases this is the same buffer, but could be different sometimes).
Diffstat (limited to 'src/plugins/script/script-command.c')
-rw-r--r--src/plugins/script/script-command.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c
index 98aad22f4..7dca16dfb 100644
--- a/src/plugins/script/script-command.c
+++ b/src/plugins/script/script-command.c
@@ -72,7 +72,7 @@ script_command_action (struct t_gui_buffer *buffer,
(quiet) ? "-q " : "",
action,
ptr_script->name_with_extension);
- script_action_schedule (str_action, need_repository,
+ script_action_schedule (buffer, str_action, need_repository,
error_repository, quiet);
}
}
@@ -83,7 +83,7 @@ script_command_action (struct t_gui_buffer *buffer,
(quiet) ? "-q " : "",
action,
arguments);
- script_action_schedule (str_action, need_repository,
+ script_action_schedule (buffer, str_action, need_repository,
error_repository, quiet);
}
}
@@ -98,7 +98,7 @@ script_command_action (struct t_gui_buffer *buffer,
snprintf (str_action, sizeof (str_action),
"-q %s",
action);
- script_action_schedule (str_action, need_repository,
+ script_action_schedule (buffer, str_action, need_repository,
error_repository, 1);
}
else
@@ -113,7 +113,7 @@ script_command_action (struct t_gui_buffer *buffer,
"-q %s %s",
action,
ptr_script->name_with_extension);
- script_action_schedule (str_action, need_repository,
+ script_action_schedule (buffer, str_action, need_repository,
error_repository, 1);
}
}
@@ -140,7 +140,7 @@ script_command_script (const void *pointer, void *data,
if (argc == 1)
{
- script_action_schedule ("buffer", 1, 1, 0);
+ script_action_schedule (buffer, "buffer", 1, 1, 0);
return WEECHAT_RC_OK;
}
@@ -164,13 +164,13 @@ script_command_script (const void *pointer, void *data,
script_repo_filter_scripts ((argc > 2) ? argv_eol[2] : NULL);
else
script_repo_set_filter ((argc > 2) ? argv_eol[2] : NULL);
- script_action_schedule ("buffer", 1, 1, 0);
+ script_action_schedule (buffer, "buffer", 1, 1, 0);
return WEECHAT_RC_OK;
}
if (weechat_strcmp (argv[1], "list") == 0)
{
- script_action_schedule (argv_eol[1], 1, 0, 0);
+ script_action_schedule (buffer, argv_eol[1], 1, 0, 0);
return WEECHAT_RC_OK;
}
@@ -206,7 +206,7 @@ script_command_script (const void *pointer, void *data,
if (weechat_strcmp (argv[1], "upgrade") == 0)
{
- script_action_schedule ("upgrade", 1, 1, 0);
+ script_action_schedule (buffer, "upgrade", 1, 1, 0);
return WEECHAT_RC_OK;
}