diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/tcl/weechat-tcl-api.c | 20 |
5 files changed, 1 insertions, 67 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 116b46c16..b4bd4d412 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -3044,12 +3044,6 @@ weechat_lua_api_prefix (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script || !lua_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "prefix"); - LUA_RETURN_EMPTY; - } - prefix = NULL; n = lua_gettop (lua_current_interpreter); @@ -3080,12 +3074,6 @@ weechat_lua_api_color (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script || !lua_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "color"); - LUA_RETURN_EMPTY; - } - color = NULL; n = lua_gettop (lua_current_interpreter); diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index 79b26f281..9f43dad39 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -2556,12 +2556,6 @@ XS (XS_weechat_api_prefix) /* make C compiler happy */ (void) cv; - if (!perl_current_script || !perl_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "prefix"); - PERL_RETURN_EMPTY; - } - if (items < 1) { WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "prefix"); @@ -2585,12 +2579,6 @@ XS (XS_weechat_api_color) /* make C compiler happy */ (void) cv; - if (!perl_current_script || !perl_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "color"); - PERL_RETURN_EMPTY; - } - if (items < 1) { WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "color"); diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index 36c002468..a2ca66541 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -2702,12 +2702,6 @@ weechat_python_api_prefix (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script || !python_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "prefix"); - PYTHON_RETURN_EMPTY; - } - prefix = NULL; if (!PyArg_ParseTuple (args, "s", &prefix)) @@ -2734,12 +2728,6 @@ weechat_python_api_color (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script || !python_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "color"); - PYTHON_RETURN_EMPTY; - } - color = NULL; if (!PyArg_ParseTuple (args, "s", &color)) diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 57ae8d196..db6703605 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -3110,12 +3110,6 @@ weechat_ruby_api_prefix (VALUE class, VALUE prefix) /* make C compiler happy */ (void) class; - if (!ruby_current_script || !ruby_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "prefix"); - RUBY_RETURN_EMPTY; - } - c_prefix = NULL; if (NIL_P (prefix)) @@ -3146,12 +3140,6 @@ weechat_ruby_api_color (VALUE class, VALUE color) /* make C compiler happy */ (void) class; - if (!ruby_current_script || !ruby_current_script->name) - { - WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "color"); - RUBY_RETURN_EMPTY; - } - c_color = NULL; if (NIL_P (color)) diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c index c7b9c5457..f0402d614 100644 --- a/src/plugins/scripts/tcl/weechat-tcl-api.c +++ b/src/plugins/scripts/tcl/weechat-tcl-api.c @@ -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"); |