summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/tcl
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/tcl
parent5f243ddd8690adeab4cc4511deb46319ca071234 (diff)
downloadweechat-a394ed5d6fcb54970d5453de02ce228c35ddd9bb.zip
Add "replacement" argument for string_remove_color in plugin API
Diffstat (limited to 'src/plugins/scripts/tcl')
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl-api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c
index 60ede1b70..790122dad 100644
--- a/src/plugins/scripts/tcl/weechat-tcl-api.c
+++ b/src/plugins/scripts/tcl/weechat-tcl-api.c
@@ -443,7 +443,7 @@ weechat_tcl_api_string_remove_color (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj* objp;
- char *result, *string;
+ char *result, *replacement, *string;
int i;
/* make C compiler happy */
@@ -455,14 +455,15 @@ weechat_tcl_api_string_remove_color (ClientData clientData, Tcl_Interp *interp,
TCL_RETURN_EMPTY;
}
- if (objc < 2)
+ if (objc < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("string_remove_color");
TCL_RETURN_EMPTY;
}
string = Tcl_GetStringFromObj (objv[1], &i);
- result = weechat_string_remove_color (string);
+ replacement = Tcl_GetStringFromObj (objv[2], &i);
+ result = weechat_string_remove_color (string, replacement);
TCL_RETURN_STRING_FREE(result);
}