summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-03-11 21:12:40 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-03-11 21:12:40 +0100
commitbc6c1f274caffb09f65418f9124005f31de4cee4 (patch)
tree185ba72c6524a401077cbdd24cc94c3f3337f2a3 /src
parent92e176ab895b9fdb5f15e3b3ade369c61cbb203f (diff)
downloadweechat-bc6c1f274caffb09f65418f9124005f31de4cee4.zip
core: improve message displayed when a command is not allowed (issue #928)
The whole command with arguments and the full buffer name are now displayed in the warning message (in debug mode only).
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-input.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/wee-input.c b/src/core/wee-input.c
index 00c7edc3c..0ab2357ee 100644
--- a/src/core/wee-input.c
+++ b/src/core/wee-input.c
@@ -115,10 +115,13 @@ input_exec_command (struct t_gui_buffer *buffer,
{
if (weechat_debug_core >= 1)
{
- gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _("debug: command \"%s\" is not "
- "allowed in this context"),
- command_name);
+ gui_chat_printf_date_tags (
+ NULL, 0, "command_forbidden," GUI_FILTER_TAG_NO_FILTER,
+ _("warning: the command \"%s\" is not currently allowed "
+ "(command: \"%s\", buffer: \"%s\")"),
+ command_name,
+ command,
+ buffer->full_name);
}
rc = WEECHAT_RC_ERROR;
goto end;