From 20f9ca7d4acf7629a9d8e884d99054f55bae76d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 19 Feb 2018 21:27:08 +0100 Subject: scripts: display the script name in stdout/stderr output from scripts --- src/plugins/python/weechat-python.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/plugins/python') diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index 8c89f84f7..f8cc8752b 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -381,9 +381,12 @@ weechat_python_output_flush () else { /* script (no eval mode) */ - weechat_printf (NULL, - weechat_gettext ("%s: stdout/stderr: %s"), - PYTHON_PLUGIN_NAME, *python_buffer_output); + weechat_printf ( + NULL, + weechat_gettext ("%s: stdout/stderr (%s): %s"), + PYTHON_PLUGIN_NAME, + (python_current_script) ? python_current_script->name : "?", + *python_buffer_output); } weechat_string_dyn_copy (python_buffer_output, NULL); -- cgit v1.2.3