mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 12:56:37 +02:00
Allow script functions "prefix" and "color" when script is not yet registered with "register"
This commit is contained in:
@@ -2924,12 +2924,6 @@ weechat_tcl_api_prefix (ClientData clientData, Tcl_Interp *interp,
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "prefix");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 2)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "prefix");
|
||||
@@ -2956,12 +2950,6 @@ weechat_tcl_api_color (ClientData clientData, Tcl_Interp *interp,
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "color");
|
||||
TCL_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
if (objc < 2)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "color");
|
||||
@@ -2984,16 +2972,10 @@ weechat_tcl_api_print (ClientData clientData, Tcl_Interp *interp,
|
||||
Tcl_Obj* objp;
|
||||
char *buffer, *message;
|
||||
int i;
|
||||
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
|
||||
if (!tcl_current_script || !tcl_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "print");
|
||||
TCL_RETURN_ERROR;
|
||||
}
|
||||
|
||||
if (objc < 3)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "print");
|
||||
|
||||
Reference in New Issue
Block a user