summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/perl
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
commita394ed5d6fcb54970d5453de02ce228c35ddd9bb (patch)
tree1f898f7982bb8ca0479470ecd64246114efb5d76 /src/plugins/scripts/perl
parent5f243ddd8690adeab4cc4511deb46319ca071234 (diff)
downloadweechat-a394ed5d6fcb54970d5453de02ce228c35ddd9bb.zip
Add "replacement" argument for string_remove_color in plugin API
Diffstat (limited to 'src/plugins/scripts/perl')
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index e38361d65..2a3ef2815 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -316,7 +316,7 @@ static XS (XS_weechat_api_ngettext)
static XS (XS_weechat_api_string_remove_color)
{
- char *result, *string;
+ char *result, *string, *replacement;
dXSARGS;
/* make C compiler happy */
@@ -328,14 +328,15 @@ static XS (XS_weechat_api_string_remove_color)
PERL_RETURN_EMPTY;
}
- if (items < 1)
+ if (items < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("string_remove_color");
PERL_RETURN_EMPTY;
}
string = SvPV (ST (0), PL_na);
- result = weechat_string_remove_color (string);
+ replacement = SvPV (ST (1), PL_na);
+ result = weechat_string_remove_color (string, replacement);
PERL_RETURN_STRING_FREE(result);
}