summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/tcl/weechat-tcl-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scripts/tcl/weechat-tcl-api.c')
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl-api.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c
index 382d0b5f5..59b9448c5 100644
--- a/src/plugins/scripts/tcl/weechat-tcl-api.c
+++ b/src/plugins/scripts/tcl/weechat-tcl-api.c
@@ -3650,7 +3650,7 @@ weechat_tcl_api_buffer_close (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *objp;
- int i,switch_to_another;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -3661,22 +3661,15 @@ weechat_tcl_api_buffer_close (ClientData clientData, Tcl_Interp *interp,
TCL_RETURN_ERROR;
}
- if (objc < 3)
- {
- WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_close");
- TCL_RETURN_ERROR;
- }
-
- if (Tcl_GetIntFromObj (interp, objv[2], &switch_to_another) != TCL_OK)
+ if (objc < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("buffer_close");
TCL_RETURN_ERROR;
}
-
+
script_api_buffer_close (weechat_tcl_plugin,
tcl_current_script,
- script_str2ptr (Tcl_GetStringFromObj (objv[1], &i)), /* buffer */
- switch_to_another); /* switch_to_another */
+ script_str2ptr (Tcl_GetStringFromObj (objv[1], &i))); /* buffer */
TCL_RETURN_OK;
}