summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/perl/weechat-perl-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-11-23 23:04:52 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-11-23 23:04:52 +0100
commit2e52e54a3afa953e12e1e009b19a66202f0674a6 (patch)
tree08fa64e1c2b89498977ae33004f62c1757288910 /src/plugins/scripts/perl/weechat-perl-api.c
parent09bed16dbd39791b43f86a1c00279c7fdb5cbb58 (diff)
downloadweechat-2e52e54a3afa953e12e1e009b19a66202f0674a6.zip
Add support for more than one proxy, with proxy selection for each IRC server (task #6859)
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl-api.c')
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index 5e6dfd17e..5507136a1 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -2299,7 +2299,7 @@ weechat_perl_api_hook_connect_cb (void *data, int status,
static XS (XS_weechat_api_hook_connect)
{
- char *address, *local_hostname, *result;
+ char *proxy, *address, *local_hostname, *result;
dXSARGS;
/* make C compiler happy */
@@ -2311,25 +2311,27 @@ static XS (XS_weechat_api_hook_connect)
PERL_RETURN_EMPTY;
}
- if (items < 6)
+ if (items < 7)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_connect");
PERL_RETURN_EMPTY;
}
- address = SvPV (ST (0), PL_na);
- local_hostname = SvPV (ST (4), PL_na);
+ proxy = SvPV (ST (0), PL_na);
+ address = SvPV (ST (1), PL_na);
+ local_hostname = SvPV (ST (5), PL_na);
result = script_ptr2str (script_api_hook_connect (weechat_perl_plugin,
perl_current_script,
+ proxy,
address,
- SvIV (ST (1)), /* port */
- SvIV (ST (2)), /* sock */
- SvIV (ST (3)), /* ipv6 */
+ SvIV (ST (2)), /* port */
+ SvIV (ST (3)), /* sock */
+ SvIV (ST (4)), /* ipv6 */
NULL, /* gnutls session */
local_hostname,
&weechat_perl_api_hook_connect_cb,
- SvPV (ST (5), PL_na))); /* perl function */
+ SvPV (ST (6), PL_na))); /* perl function */
PERL_RETURN_STRING_FREE(result);
}