summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/perl/weechat-perl-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-04-01 19:03:05 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-04-01 19:03:05 +0200
commitff83985ef4f4073f9430ee065b1d8982fb7c6318 (patch)
tree2b94f2cd1e36de9bb54a02153e1d30be8145bc21 /src/plugins/scripts/perl/weechat-perl-api.c
parent51af351c15c0277d0c6f060624b67b04e77710df (diff)
downloadweechat-ff83985ef4f4073f9430ee065b1d8982fb7c6318.zip
Add default template completion (by default: nick or IRC channel)
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl-api.c')
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index dfeb36686..6b9db3e23 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -462,7 +462,7 @@ static XS (XS_weechat_api_list_new)
static XS (XS_weechat_api_list_add)
{
- char *result, *weelist, *data, *where;
+ char *result, *weelist, *data, *where, *user_data;
dXSARGS;
/* make C compiler happy */
@@ -474,7 +474,7 @@ static XS (XS_weechat_api_list_add)
PERL_RETURN_EMPTY;
}
- if (items < 3)
+ if (items < 4)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("list_add");
PERL_RETURN_EMPTY;
@@ -483,9 +483,11 @@ static XS (XS_weechat_api_list_add)
weelist = SvPV (ST (0), PL_na);
data = SvPV (ST (1), PL_na);
where = SvPV (ST (2), PL_na);
+ user_data = SvPV (ST (3), PL_na);
result = script_ptr2str (weechat_list_add (script_str2ptr (weelist),
data,
- where));
+ where,
+ script_str2ptr (user_data)));
PERL_RETURN_STRING_FREE(result);
}