summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python/weechat-python.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-05-02 16:17:31 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-05-02 16:17:31 +0200
commit5f1c0c8254fdea03f1c42b569a67acd2b1c493ac (patch)
tree63083dd3268fb2cc6425ed84fe50e3141d80ef07 /src/plugins/scripts/python/weechat-python.c
parenta09fc8472698d6f269a0d3f9f203ecd79f757bfc (diff)
downloadweechat-5f1c0c8254fdea03f1c42b569a67acd2b1c493ac.zip
Add data string argument in all callbacks of script API, display script name in error messages for scripts
Diffstat (limited to 'src/plugins/scripts/python/weechat-python.c')
-rw-r--r--src/plugins/scripts/python/weechat-python.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index 67c7b9834..46cfbbc80 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -120,11 +120,22 @@ weechat_python_exec (struct t_plugin_script *script,
{
if (argv[6])
{
- rc = PyObject_CallFunction (evFunc, "sssssss",
- argv[0], argv[1],
- argv[2], argv[3],
- argv[4], argv[5],
- argv[6]);
+ if (argv[7])
+ {
+ rc = PyObject_CallFunction (evFunc, "ssssssss",
+ argv[0], argv[1],
+ argv[2], argv[3],
+ argv[4], argv[5],
+ argv[6], argv[7]);
+ }
+ else
+ {
+ rc = PyObject_CallFunction (evFunc, "sssssss",
+ argv[0], argv[1],
+ argv[2], argv[3],
+ argv[4], argv[5],
+ argv[6]);
+ }
}
else
{