diff options
Diffstat (limited to 'src/plugins/scripts/script.h')
-rw-r--r-- | src/plugins/scripts/script.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/scripts/script.h b/src/plugins/scripts/script.h index 1b0f094fd..f2682a89d 100644 --- a/src/plugins/scripts/script.h +++ b/src/plugins/scripts/script.h @@ -23,19 +23,23 @@ #define WEECHAT_SCRIPT_EXEC_INT 1 #define WEECHAT_SCRIPT_EXEC_STRING 2 -#define WEECHAT_SCRIPT_MSG_NOT_INITIALIZED(__function) \ +#define WEECHAT_SCRIPT_MSG_NOT_INIT(__current_script, \ + __function) \ weechat_printf (NULL, \ weechat_gettext("%s%s: unable to call function " \ "\"%s\", script is not " \ - "initialized"), \ + "initialized (script: %s)"), \ weechat_prefix ("error"), weechat_plugin->name, \ - __function) -#define WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS(__function) \ + __function, \ + (__current_script) ? __current_script : "-"); +#define WEECHAT_SCRIPT_MSG_WRONG_ARGS(__current_script, \ + __function) \ weechat_printf (NULL, \ weechat_gettext("%s%s: wrong arguments for " \ - "function \"%s\""), \ + "function \"%s\" (script: %s)"), \ weechat_prefix ("error"), weechat_plugin->name, \ - __function) + __function, \ + (__current_script) ? __current_script : "-"); struct t_plugin_script { |