diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 18205095b..116b46c16 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -154,7 +154,7 @@ weechat_lua_api_plugin_get_name (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "plugin_get_name"); LUA_RETURN_EMPTY; @@ -190,7 +190,7 @@ weechat_lua_api_charset_set (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "charset_set"); LUA_RETURN_ERROR; @@ -228,7 +228,7 @@ weechat_lua_api_iconv_to_internal (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "iconv_to_internal"); LUA_RETURN_EMPTY; @@ -268,7 +268,7 @@ weechat_lua_api_iconv_from_internal (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "iconv_from_internal"); LUA_RETURN_EMPTY; @@ -306,7 +306,7 @@ weechat_lua_api_gettext (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "gettext"); LUA_RETURN_EMPTY; @@ -342,7 +342,7 @@ weechat_lua_api_ngettext (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "ngettext"); LUA_RETURN_EMPTY; @@ -384,7 +384,7 @@ weechat_lua_api_string_match (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_match"); LUA_RETURN_INT(0); @@ -428,7 +428,7 @@ weechat_lua_api_string_has_highlight (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_has_highlight"); LUA_RETURN_INT(0); @@ -470,7 +470,7 @@ weechat_lua_api_string_mask_to_regex (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_mask_to_regex"); LUA_RETURN_EMPTY; @@ -507,7 +507,7 @@ weechat_lua_api_string_remove_color (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_remove_color"); LUA_RETURN_EMPTY; @@ -545,7 +545,7 @@ weechat_lua_api_string_is_command_char (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_is_command_char"); LUA_RETURN_INT(0); @@ -583,7 +583,7 @@ weechat_lua_api_string_input_for_buffer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "string_input_for_buffer"); LUA_RETURN_EMPTY; @@ -619,7 +619,7 @@ weechat_lua_api_mkdir_home (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir_home"); LUA_RETURN_ERROR; @@ -658,7 +658,7 @@ weechat_lua_api_mkdir (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir"); LUA_RETURN_ERROR; @@ -698,7 +698,7 @@ weechat_lua_api_mkdir_parents (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "mkdir_parents"); LUA_RETURN_ERROR; @@ -736,7 +736,7 @@ weechat_lua_api_list_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_new"); LUA_RETURN_EMPTY; @@ -761,7 +761,7 @@ weechat_lua_api_list_add (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_add"); LUA_RETURN_EMPTY; @@ -807,7 +807,7 @@ weechat_lua_api_list_search (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_search"); LUA_RETURN_EMPTY; @@ -847,7 +847,7 @@ weechat_lua_api_list_casesearch (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_casesearch"); LUA_RETURN_EMPTY; @@ -887,7 +887,7 @@ weechat_lua_api_list_get (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_get"); LUA_RETURN_EMPTY; @@ -926,7 +926,7 @@ weechat_lua_api_list_set (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_set"); LUA_RETURN_ERROR; @@ -966,7 +966,7 @@ weechat_lua_api_list_next (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_next"); LUA_RETURN_EMPTY; @@ -1003,7 +1003,7 @@ weechat_lua_api_list_prev (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_prev"); LUA_RETURN_EMPTY; @@ -1039,7 +1039,7 @@ weechat_lua_api_list_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_string"); LUA_RETURN_EMPTY; @@ -1075,7 +1075,7 @@ weechat_lua_api_list_size (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_size"); LUA_RETURN_INT(0); @@ -1111,7 +1111,7 @@ weechat_lua_api_list_remove (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_remove"); LUA_RETURN_ERROR; @@ -1150,7 +1150,7 @@ weechat_lua_api_list_remove_all (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_remove_all"); LUA_RETURN_ERROR; @@ -1186,7 +1186,7 @@ weechat_lua_api_list_free (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "list_free"); LUA_RETURN_ERROR; @@ -1265,7 +1265,7 @@ weechat_lua_api_config_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_new"); LUA_RETURN_EMPTY; @@ -1548,7 +1548,7 @@ weechat_lua_api_config_new_section (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_new_section"); LUA_RETURN_EMPTY; @@ -1631,7 +1631,7 @@ weechat_lua_api_config_search_section (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_search_section"); LUA_RETURN_EMPTY; @@ -1784,7 +1784,7 @@ weechat_lua_api_config_new_option (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_new_option"); LUA_RETURN_EMPTY; @@ -1874,7 +1874,7 @@ weechat_lua_api_config_search_option (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_search_option"); LUA_RETURN_EMPTY; @@ -1916,7 +1916,7 @@ weechat_lua_api_config_string_to_boolean (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_string_to_boolean"); LUA_RETURN_INT(0); @@ -1952,7 +1952,7 @@ weechat_lua_api_config_option_reset (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_reset"); LUA_RETURN_INT(0); @@ -1991,7 +1991,7 @@ weechat_lua_api_config_option_set (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_set"); LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2034,7 +2034,7 @@ weechat_lua_api_config_option_set_null (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_set_null"); LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2073,7 +2073,7 @@ weechat_lua_api_config_option_unset (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_unset"); LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2109,7 +2109,7 @@ weechat_lua_api_config_option_rename (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_rename"); LUA_RETURN_ERROR; @@ -2148,7 +2148,7 @@ weechat_lua_api_config_option_is_null (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_is_null"); LUA_RETURN_INT(1); @@ -2185,7 +2185,7 @@ weechat_lua_api_config_option_default_is_null (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_default_is_null"); LUA_RETURN_INT(1); @@ -2221,7 +2221,7 @@ weechat_lua_api_config_boolean (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_boolean"); LUA_RETURN_INT(0); @@ -2257,7 +2257,7 @@ weechat_lua_api_config_boolean_default (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_boolean_default"); LUA_RETURN_INT(0); @@ -2293,7 +2293,7 @@ weechat_lua_api_config_integer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_integer"); LUA_RETURN_INT(0); @@ -2329,7 +2329,7 @@ weechat_lua_api_config_integer_default (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_integer_default"); LUA_RETURN_INT(0); @@ -2365,7 +2365,7 @@ weechat_lua_api_config_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_string"); LUA_RETURN_EMPTY; @@ -2401,7 +2401,7 @@ weechat_lua_api_config_string_default (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_string_default"); LUA_RETURN_EMPTY; @@ -2437,7 +2437,7 @@ weechat_lua_api_config_color (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_color"); LUA_RETURN_INT(0); @@ -2473,7 +2473,7 @@ weechat_lua_api_config_color_default (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_color_default"); LUA_RETURN_INT(0); @@ -2509,7 +2509,7 @@ weechat_lua_api_config_write_option (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_write_option"); LUA_RETURN_ERROR; @@ -2548,7 +2548,7 @@ weechat_lua_api_config_write_line (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_write_line"); LUA_RETURN_ERROR; @@ -2591,7 +2591,7 @@ weechat_lua_api_config_write (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_write"); LUA_RETURN_INT(-1); @@ -2627,7 +2627,7 @@ weechat_lua_api_config_read (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_read"); LUA_RETURN_INT(-1); @@ -2663,7 +2663,7 @@ weechat_lua_api_config_reload (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_reload"); LUA_RETURN_INT(-1); @@ -2699,7 +2699,7 @@ weechat_lua_api_config_option_free (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_option_free"); LUA_RETURN_ERROR; @@ -2738,7 +2738,7 @@ weechat_lua_api_config_section_free_options (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_section_free_options"); LUA_RETURN_ERROR; @@ -2776,7 +2776,7 @@ weechat_lua_api_config_section_free (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_section_free"); LUA_RETURN_ERROR; @@ -2814,7 +2814,7 @@ weechat_lua_api_config_free (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_free"); LUA_RETURN_ERROR; @@ -2853,7 +2853,7 @@ weechat_lua_api_config_get (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_get"); LUA_RETURN_EMPTY; @@ -2889,7 +2889,7 @@ weechat_lua_api_config_get_plugin (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_get_plugin"); LUA_RETURN_EMPTY; @@ -2927,7 +2927,7 @@ weechat_lua_api_config_is_set_plugin (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_is_set_plugin"); LUA_RETURN_INT(0); @@ -2965,7 +2965,7 @@ weechat_lua_api_config_set_plugin (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_set_plugin"); LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -3006,7 +3006,7 @@ weechat_lua_api_config_unset_plugin (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "config_unset_plugin"); LUA_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -3044,7 +3044,7 @@ weechat_lua_api_prefix (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "prefix"); LUA_RETURN_EMPTY; @@ -3080,7 +3080,7 @@ weechat_lua_api_color (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "color"); LUA_RETURN_EMPTY; @@ -3152,7 +3152,7 @@ weechat_lua_api_print_date_tags (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "print_date_tags"); LUA_RETURN_ERROR; @@ -3199,7 +3199,7 @@ weechat_lua_api_print_y (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "print_y"); LUA_RETURN_ERROR; @@ -3243,7 +3243,7 @@ weechat_lua_api_log_print (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "log_print"); LUA_RETURN_ERROR; @@ -3328,7 +3328,7 @@ weechat_lua_api_hook_command (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_command"); LUA_RETURN_EMPTY; @@ -3428,7 +3428,7 @@ weechat_lua_api_hook_command_run (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_command_run"); LUA_RETURN_EMPTY; @@ -3515,7 +3515,7 @@ weechat_lua_api_hook_timer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_timer"); LUA_RETURN_EMPTY; @@ -3607,7 +3607,7 @@ weechat_lua_api_hook_fd (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_fd"); LUA_RETURN_EMPTY; @@ -3707,7 +3707,7 @@ weechat_lua_api_hook_process (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_process"); LUA_RETURN_EMPTY; @@ -3801,7 +3801,7 @@ weechat_lua_api_hook_connect (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_connect"); LUA_RETURN_EMPTY; @@ -3929,7 +3929,7 @@ weechat_lua_api_hook_print (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_print"); LUA_RETURN_EMPTY; @@ -4044,7 +4044,7 @@ weechat_lua_api_hook_signal (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_signal"); LUA_RETURN_EMPTY; @@ -4089,7 +4089,7 @@ weechat_lua_api_hook_signal_send (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_signal_send"); LUA_RETURN_ERROR; @@ -4187,7 +4187,7 @@ weechat_lua_api_hook_config (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_config"); LUA_RETURN_EMPTY; @@ -4280,7 +4280,7 @@ weechat_lua_api_hook_completion (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_completion"); LUA_RETURN_EMPTY; @@ -4328,7 +4328,7 @@ weechat_lua_api_hook_completion_list_add (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_completion_list_add"); LUA_RETURN_ERROR; @@ -4405,7 +4405,7 @@ weechat_lua_api_hook_modifier (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_modifier"); LUA_RETURN_EMPTY; @@ -4451,7 +4451,7 @@ weechat_lua_api_hook_modifier_exec (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_modifier_exec"); LUA_RETURN_EMPTY; @@ -4521,7 +4521,7 @@ weechat_lua_api_hook_info (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_info"); LUA_RETURN_EMPTY; @@ -4603,7 +4603,7 @@ weechat_lua_api_hook_info_hashtable (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_info_hashtable"); LUA_RETURN_EMPTY; @@ -4695,7 +4695,7 @@ weechat_lua_api_hook_infolist (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_infolist"); LUA_RETURN_EMPTY; @@ -4749,7 +4749,7 @@ weechat_lua_api_unhook (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "unhook"); LUA_RETURN_ERROR; @@ -4784,7 +4784,7 @@ weechat_lua_api_unhook_all (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "unhook_all"); LUA_RETURN_ERROR; @@ -4892,7 +4892,7 @@ weechat_lua_api_buffer_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_new"); LUA_RETURN_EMPTY; @@ -4945,7 +4945,7 @@ weechat_lua_api_buffer_search (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_search"); LUA_RETURN_EMPTY; @@ -4982,7 +4982,7 @@ weechat_lua_api_buffer_search_main (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_search_main"); LUA_RETURN_EMPTY; @@ -5005,7 +5005,7 @@ weechat_lua_api_current_buffer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "current_buffer"); LUA_RETURN_EMPTY; @@ -5029,7 +5029,7 @@ weechat_lua_api_buffer_clear (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_clear"); LUA_RETURN_ERROR; @@ -5065,7 +5065,7 @@ weechat_lua_api_buffer_close (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_close"); LUA_RETURN_ERROR; @@ -5103,7 +5103,7 @@ weechat_lua_api_buffer_merge (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_merge"); LUA_RETURN_ERROR; @@ -5143,7 +5143,7 @@ weechat_lua_api_buffer_unmerge (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_unmerge"); LUA_RETURN_ERROR; @@ -5181,7 +5181,7 @@ weechat_lua_api_buffer_get_integer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_integer"); LUA_RETURN_INT(-1); @@ -5220,7 +5220,7 @@ weechat_lua_api_buffer_get_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_string"); LUA_RETURN_EMPTY; @@ -5260,7 +5260,7 @@ weechat_lua_api_buffer_get_pointer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_get_pointer"); LUA_RETURN_EMPTY; @@ -5299,7 +5299,7 @@ weechat_lua_api_buffer_set (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_set"); LUA_RETURN_ERROR; @@ -5340,7 +5340,7 @@ weechat_lua_api_buffer_string_replace_local_var (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var"); LUA_RETURN_ERROR; @@ -5377,7 +5377,7 @@ weechat_lua_api_current_window (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "current_window"); LUA_RETURN_EMPTY; @@ -5401,7 +5401,7 @@ weechat_lua_api_window_get_integer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_integer"); LUA_RETURN_INT(-1); @@ -5440,7 +5440,7 @@ weechat_lua_api_window_get_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_string"); LUA_RETURN_EMPTY; @@ -5480,7 +5480,7 @@ weechat_lua_api_window_get_pointer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_get_pointer"); LUA_RETURN_EMPTY; @@ -5519,7 +5519,7 @@ weechat_lua_api_window_set_title (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "window_set_title"); LUA_RETURN_ERROR; @@ -5556,7 +5556,7 @@ weechat_lua_api_nicklist_add_group (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_add_group"); LUA_RETURN_EMPTY; @@ -5605,7 +5605,7 @@ weechat_lua_api_nicklist_search_group (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_search_group"); LUA_RETURN_EMPTY; @@ -5648,7 +5648,7 @@ weechat_lua_api_nicklist_add_nick (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_add_nick"); LUA_RETURN_EMPTY; @@ -5703,7 +5703,7 @@ weechat_lua_api_nicklist_search_nick (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_search_nick"); LUA_RETURN_EMPTY; @@ -5745,7 +5745,7 @@ weechat_lua_api_nicklist_remove_group (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_group"); LUA_RETURN_ERROR; @@ -5784,7 +5784,7 @@ weechat_lua_api_nicklist_remove_nick (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_nick"); LUA_RETURN_ERROR; @@ -5823,7 +5823,7 @@ weechat_lua_api_nicklist_remove_all (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "nicklist_remove_all"); LUA_RETURN_ERROR; @@ -5860,7 +5860,7 @@ weechat_lua_api_bar_item_search (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_search"); LUA_RETURN_EMPTY; @@ -5933,7 +5933,7 @@ weechat_lua_api_bar_item_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_new"); LUA_RETURN_EMPTY; @@ -5978,7 +5978,7 @@ weechat_lua_api_bar_item_update (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_update"); LUA_RETURN_ERROR; @@ -6014,7 +6014,7 @@ weechat_lua_api_bar_item_remove (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_item_remove"); LUA_RETURN_ERROR; @@ -6053,7 +6053,7 @@ weechat_lua_api_bar_search (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_search"); LUA_RETURN_EMPTY; @@ -6092,7 +6092,7 @@ weechat_lua_api_bar_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_new"); LUA_RETURN_EMPTY; @@ -6170,7 +6170,7 @@ weechat_lua_api_bar_set (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_set"); LUA_RETURN_ERROR; @@ -6211,7 +6211,7 @@ weechat_lua_api_bar_update (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_update"); LUA_RETURN_ERROR; @@ -6247,7 +6247,7 @@ weechat_lua_api_bar_remove (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "bar_remove"); LUA_RETURN_ERROR; @@ -6283,7 +6283,7 @@ weechat_lua_api_command (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "command"); LUA_RETURN_ERROR; @@ -6324,7 +6324,7 @@ weechat_lua_api_info_get (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "info_get"); LUA_RETURN_EMPTY; @@ -6363,7 +6363,7 @@ weechat_lua_api_info_get_hashtable (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "info_get_hashtable"); LUA_RETURN_EMPTY; @@ -6408,7 +6408,7 @@ weechat_lua_api_infolist_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new"); LUA_RETURN_EMPTY; @@ -6433,7 +6433,7 @@ weechat_lua_api_infolist_new_item (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new_item"); LUA_RETURN_EMPTY; @@ -6471,7 +6471,7 @@ weechat_lua_api_infolist_new_var_integer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new_var_integer"); LUA_RETURN_EMPTY; @@ -6515,7 +6515,7 @@ weechat_lua_api_infolist_new_var_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new_var_string"); LUA_RETURN_EMPTY; @@ -6559,7 +6559,7 @@ weechat_lua_api_infolist_new_var_pointer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer"); LUA_RETURN_EMPTY; @@ -6602,7 +6602,7 @@ weechat_lua_api_infolist_new_var_time (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_new_var_time"); LUA_RETURN_EMPTY; @@ -6645,7 +6645,7 @@ weechat_lua_api_infolist_get (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_get"); LUA_RETURN_EMPTY; @@ -6687,7 +6687,7 @@ weechat_lua_api_infolist_next (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_next"); LUA_RETURN_INT(0); @@ -6723,7 +6723,7 @@ weechat_lua_api_infolist_prev (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_prev"); LUA_RETURN_INT(0); @@ -6760,7 +6760,7 @@ weechat_lua_api_infolist_reset_item_cursor (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); LUA_RETURN_ERROR; @@ -6796,7 +6796,7 @@ weechat_lua_api_infolist_fields (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_fields"); LUA_RETURN_EMPTY; @@ -6832,7 +6832,7 @@ weechat_lua_api_infolist_integer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_integer"); LUA_RETURN_INT(0); @@ -6871,7 +6871,7 @@ weechat_lua_api_infolist_string (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_string"); LUA_RETURN_EMPTY; @@ -6911,7 +6911,7 @@ weechat_lua_api_infolist_pointer (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_pointer"); LUA_RETURN_EMPTY; @@ -6952,7 +6952,7 @@ weechat_lua_api_infolist_time (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_time"); LUA_RETURN_EMPTY; @@ -6993,7 +6993,7 @@ weechat_lua_api_infolist_free (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "infolist_free"); LUA_RETURN_ERROR; @@ -7030,7 +7030,7 @@ weechat_lua_api_upgrade_new (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "upgrade_new"); LUA_RETURN_EMPTY; @@ -7068,7 +7068,7 @@ weechat_lua_api_upgrade_write_object (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "upgrade_write_object"); LUA_RETURN_INT(0); @@ -7159,7 +7159,7 @@ weechat_lua_api_upgrade_read (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "upgrade_read"); LUA_RETURN_EMPTY; @@ -7204,7 +7204,7 @@ weechat_lua_api_upgrade_close (lua_State *L) /* make C compiler happy */ (void) L; - if (!lua_current_script) + if (!lua_current_script || !lua_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "upgrade_close"); LUA_RETURN_ERROR; diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index 7d5b91e39..79b26f281 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -148,7 +148,7 @@ XS (XS_weechat_api_plugin_get_name) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "plugin_get_name"); PERL_RETURN_EMPTY; @@ -176,7 +176,7 @@ XS (XS_weechat_api_charset_set) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "charset_set"); PERL_RETURN_ERROR; @@ -206,7 +206,7 @@ XS (XS_weechat_api_iconv_to_internal) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "iconv_to_internal"); PERL_RETURN_EMPTY; @@ -239,7 +239,7 @@ XS (XS_weechat_api_iconv_from_internal) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "iconv_from_internal"); PERL_RETURN_EMPTY; @@ -271,7 +271,7 @@ XS (XS_weechat_api_gettext) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "gettext"); PERL_RETURN_EMPTY; @@ -301,7 +301,7 @@ XS (XS_weechat_api_ngettext) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "ngettext"); PERL_RETURN_EMPTY; @@ -336,7 +336,7 @@ XS (XS_weechat_api_string_match) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_match"); PERL_RETURN_INT(0); @@ -369,7 +369,7 @@ XS (XS_weechat_api_string_has_highlight) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_has_highlight"); PERL_RETURN_INT(0); @@ -401,7 +401,7 @@ XS (XS_weechat_api_string_mask_to_regex) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_mask_to_regex"); PERL_RETURN_EMPTY; @@ -430,7 +430,7 @@ XS (XS_weechat_api_string_remove_color) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_remove_color"); PERL_RETURN_EMPTY; @@ -463,7 +463,7 @@ XS (XS_weechat_api_string_is_command_char) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_is_command_char"); PERL_RETURN_INT(0); @@ -493,7 +493,7 @@ XS (XS_weechat_api_string_input_for_buffer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "string_input_for_buffer"); PERL_RETURN_EMPTY; @@ -521,7 +521,7 @@ XS (XS_weechat_api_mkdir_home) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "mkdir_home"); PERL_RETURN_ERROR; @@ -551,7 +551,7 @@ XS (XS_weechat_api_mkdir) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "mkdir"); PERL_RETURN_ERROR; @@ -582,7 +582,7 @@ XS (XS_weechat_api_mkdir_parents) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "mkdir_parents"); PERL_RETURN_ERROR; @@ -614,7 +614,7 @@ XS (XS_weechat_api_list_new) (void) items; (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_new"); PERL_RETURN_EMPTY; @@ -637,7 +637,7 @@ XS (XS_weechat_api_list_add) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_add"); PERL_RETURN_EMPTY; @@ -674,7 +674,7 @@ XS (XS_weechat_api_list_search) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_search"); PERL_RETURN_EMPTY; @@ -707,7 +707,7 @@ XS (XS_weechat_api_list_casesearch) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_casesearch"); PERL_RETURN_EMPTY; @@ -740,7 +740,7 @@ XS (XS_weechat_api_list_get) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_get"); PERL_RETURN_EMPTY; @@ -770,7 +770,7 @@ XS (XS_weechat_api_list_set) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_set"); PERL_RETURN_ERROR; @@ -802,7 +802,7 @@ XS (XS_weechat_api_list_next) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_next"); PERL_RETURN_EMPTY; @@ -831,7 +831,7 @@ XS (XS_weechat_api_list_prev) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_prev"); PERL_RETURN_EMPTY; @@ -860,7 +860,7 @@ XS (XS_weechat_api_list_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_string"); PERL_RETURN_EMPTY; @@ -889,7 +889,7 @@ XS (XS_weechat_api_list_size) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_size"); PERL_RETURN_INT(0); @@ -918,7 +918,7 @@ XS (XS_weechat_api_list_remove) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_remove"); PERL_RETURN_ERROR; @@ -949,7 +949,7 @@ XS (XS_weechat_api_list_remove_all) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_remove_all"); PERL_RETURN_ERROR; @@ -977,7 +977,7 @@ XS (XS_weechat_api_list_free) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "list_free"); PERL_RETURN_ERROR; @@ -1047,7 +1047,7 @@ XS (XS_weechat_api_config_new) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_new"); PERL_RETURN_EMPTY; @@ -1323,7 +1323,7 @@ XS (XS_weechat_api_config_new_section) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_new_section"); PERL_RETURN_EMPTY; @@ -1385,7 +1385,7 @@ XS (XS_weechat_api_config_search_section) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_search_section"); PERL_RETURN_EMPTY; @@ -1531,7 +1531,7 @@ XS (XS_weechat_api_config_new_option) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_new_option"); PERL_RETURN_EMPTY; @@ -1596,7 +1596,7 @@ XS (XS_weechat_api_config_search_option) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_search_option"); PERL_RETURN_EMPTY; @@ -1631,7 +1631,7 @@ XS (XS_weechat_api_config_string_to_boolean) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_string_to_boolean"); PERL_RETURN_INT(0); @@ -1661,7 +1661,7 @@ XS (XS_weechat_api_config_option_reset) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_reset"); PERL_RETURN_INT(0); @@ -1694,7 +1694,7 @@ XS (XS_weechat_api_config_option_set) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_set"); PERL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -1729,7 +1729,7 @@ XS (XS_weechat_api_config_option_set_null) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_set_null"); PERL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -1762,7 +1762,7 @@ XS (XS_weechat_api_config_option_unset) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_unset"); PERL_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -1793,7 +1793,7 @@ XS (XS_weechat_api_config_option_rename) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_rename"); PERL_RETURN_ERROR; @@ -1826,7 +1826,7 @@ XS (XS_weechat_api_config_option_is_null) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_is_null"); PERL_RETURN_INT(1); @@ -1856,7 +1856,7 @@ XS (XS_weechat_api_config_option_default_is_null) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_default_is_null"); PERL_RETURN_INT(1); @@ -1885,7 +1885,7 @@ XS (XS_weechat_api_config_boolean) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_boolean"); PERL_RETURN_INT(0); @@ -1914,7 +1914,7 @@ XS (XS_weechat_api_config_boolean_default) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_boolean_default"); PERL_RETURN_INT(0); @@ -1943,7 +1943,7 @@ XS (XS_weechat_api_config_integer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_integer"); PERL_RETURN_INT(0); @@ -1972,7 +1972,7 @@ XS (XS_weechat_api_config_integer_default) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_integer_default"); PERL_RETURN_INT(0); @@ -2001,7 +2001,7 @@ XS (XS_weechat_api_config_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_string"); PERL_RETURN_EMPTY; @@ -2030,7 +2030,7 @@ XS (XS_weechat_api_config_string_default) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_string_default"); PERL_RETURN_EMPTY; @@ -2059,7 +2059,7 @@ XS (XS_weechat_api_config_color) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_color"); PERL_RETURN_INT(0); @@ -2088,7 +2088,7 @@ XS (XS_weechat_api_config_color_default) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_color_default"); PERL_RETURN_INT(0); @@ -2117,7 +2117,7 @@ XS (XS_weechat_api_config_write_option) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_write_option"); PERL_RETURN_ERROR; @@ -2150,7 +2150,7 @@ XS (XS_weechat_api_config_write_line) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_write_line"); PERL_RETURN_ERROR; @@ -2184,7 +2184,7 @@ XS (XS_weechat_api_config_write) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_write"); PERL_RETURN_INT(-1); @@ -2213,7 +2213,7 @@ XS (XS_weechat_api_config_read) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_read"); PERL_RETURN_INT(-1); @@ -2242,7 +2242,7 @@ XS (XS_weechat_api_config_reload) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_reload"); PERL_RETURN_INT(-1); @@ -2270,7 +2270,7 @@ XS (XS_weechat_api_config_option_free) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_option_free"); PERL_RETURN_ERROR; @@ -2301,7 +2301,7 @@ XS (XS_weechat_api_config_section_free_options) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_section_free_options"); PERL_RETURN_ERROR; @@ -2331,7 +2331,7 @@ XS (XS_weechat_api_config_section_free) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_section_free"); PERL_RETURN_ERROR; @@ -2361,7 +2361,7 @@ XS (XS_weechat_api_config_free) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_free"); PERL_RETURN_ERROR; @@ -2392,7 +2392,7 @@ XS (XS_weechat_api_config_get) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_get"); PERL_RETURN_EMPTY; @@ -2421,7 +2421,7 @@ XS (XS_weechat_api_config_get_plugin) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_get_plugin"); PERL_RETURN_EMPTY; @@ -2453,7 +2453,7 @@ XS (XS_weechat_api_config_is_set_plugin) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_is_set_plugin"); PERL_RETURN_INT(0); @@ -2487,7 +2487,7 @@ XS (XS_weechat_api_config_set_plugin) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_set_plugin"); PERL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2523,7 +2523,7 @@ XS (XS_weechat_api_config_unset_plugin) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "config_unset_plugin"); PERL_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2556,7 +2556,7 @@ XS (XS_weechat_api_prefix) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "prefix"); PERL_RETURN_EMPTY; @@ -2585,7 +2585,7 @@ XS (XS_weechat_api_color) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "color"); PERL_RETURN_EMPTY; @@ -2644,7 +2644,7 @@ XS (XS_weechat_api_print_date_tags) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "print_date_tags"); PERL_RETURN_ERROR; @@ -2682,7 +2682,7 @@ XS (XS_weechat_api_print_y) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "print_y"); PERL_RETURN_ERROR; @@ -2717,7 +2717,7 @@ XS (XS_weechat_api_log_print) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "log_print"); PERL_RETURN_ERROR; @@ -2794,7 +2794,7 @@ XS (XS_weechat_api_hook_command) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_command"); PERL_RETURN_EMPTY; @@ -2882,7 +2882,7 @@ XS (XS_weechat_api_hook_command_run) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_command_run"); PERL_RETURN_EMPTY; @@ -2961,7 +2961,7 @@ XS (XS_weechat_api_hook_timer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_timer"); PERL_RETURN_EMPTY; @@ -3037,7 +3037,7 @@ XS (XS_weechat_api_hook_fd) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_fd"); PERL_RETURN_EMPTY; @@ -3119,7 +3119,7 @@ XS (XS_weechat_api_hook_process) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_process"); PERL_RETURN_EMPTY; @@ -3204,7 +3204,7 @@ XS (XS_weechat_api_hook_connect) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_connect"); PERL_RETURN_EMPTY; @@ -3316,7 +3316,7 @@ XS (XS_weechat_api_hook_print) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_print"); PERL_RETURN_EMPTY; @@ -3419,7 +3419,7 @@ XS (XS_weechat_api_hook_signal) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_signal"); PERL_RETURN_EMPTY; @@ -3458,7 +3458,7 @@ XS (XS_weechat_api_hook_signal_send) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_signal_send"); PERL_RETURN_ERROR; @@ -3549,7 +3549,7 @@ XS (XS_weechat_api_hook_config) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_config"); PERL_RETURN_EMPTY; @@ -3633,7 +3633,7 @@ XS (XS_weechat_api_hook_completion) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_completion"); PERL_RETURN_EMPTY; @@ -3673,7 +3673,7 @@ XS (XS_weechat_api_hook_completion_list_add) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_completion_list_add"); PERL_RETURN_ERROR; @@ -3739,7 +3739,7 @@ XS (XS_weechat_api_hook_modifier) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_modifier"); PERL_RETURN_EMPTY; @@ -3777,7 +3777,7 @@ XS (XS_weechat_api_hook_modifier_exec) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_modifier_exec"); PERL_RETURN_EMPTY; @@ -3839,7 +3839,7 @@ XS (XS_weechat_api_hook_info) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_info"); PERL_RETURN_EMPTY; @@ -3911,7 +3911,7 @@ XS (XS_weechat_api_hook_info_hashtable) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_info_hashtable"); PERL_RETURN_EMPTY; @@ -3992,7 +3992,7 @@ XS (XS_weechat_api_hook_infolist) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_infolist"); PERL_RETURN_EMPTY; @@ -4035,7 +4035,7 @@ XS (XS_weechat_api_unhook) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "unhook"); PERL_RETURN_ERROR; @@ -4066,7 +4066,7 @@ XS (XS_weechat_api_unhook_all) (void) cv; (void) items; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "unhook_all"); PERL_RETURN_ERROR; @@ -4170,7 +4170,7 @@ XS (XS_weechat_api_buffer_new) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_new"); PERL_RETURN_EMPTY; @@ -4213,7 +4213,7 @@ XS (XS_weechat_api_buffer_search) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_search"); PERL_RETURN_EMPTY; @@ -4246,7 +4246,7 @@ XS (XS_weechat_api_buffer_search_main) (void) items; (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_search_main"); PERL_RETURN_EMPTY; @@ -4270,7 +4270,7 @@ XS (XS_weechat_api_current_buffer) (void) items; (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "current_buffer"); PERL_RETURN_EMPTY; @@ -4292,7 +4292,7 @@ XS (XS_weechat_api_buffer_clear) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_clear"); PERL_RETURN_ERROR; @@ -4320,7 +4320,7 @@ XS (XS_weechat_api_buffer_close) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_close"); PERL_RETURN_ERROR; @@ -4350,7 +4350,7 @@ XS (XS_weechat_api_buffer_merge) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_merge"); PERL_RETURN_ERROR; @@ -4379,7 +4379,7 @@ XS (XS_weechat_api_buffer_unmerge) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_unmerge"); PERL_RETURN_ERROR; @@ -4410,7 +4410,7 @@ XS (XS_weechat_api_buffer_get_integer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_get_integer"); PERL_RETURN_INT(-1); @@ -4443,7 +4443,7 @@ XS (XS_weechat_api_buffer_get_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_get_string"); PERL_RETURN_EMPTY; @@ -4475,7 +4475,7 @@ XS (XS_weechat_api_buffer_get_pointer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_get_pointer"); PERL_RETURN_EMPTY; @@ -4508,7 +4508,7 @@ XS (XS_weechat_api_buffer_set) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_set"); PERL_RETURN_ERROR; @@ -4542,7 +4542,7 @@ XS (XS_weechat_api_buffer_string_replace_local_var) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var"); PERL_RETURN_ERROR; @@ -4575,7 +4575,7 @@ XS (XS_weechat_api_current_window) (void) items; (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "current_window"); PERL_RETURN_EMPTY; @@ -4599,7 +4599,7 @@ XS (XS_weechat_api_window_get_integer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "window_get_integer"); PERL_RETURN_INT(-1); @@ -4632,7 +4632,7 @@ XS (XS_weechat_api_window_get_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "window_get_string"); PERL_RETURN_EMPTY; @@ -4664,7 +4664,7 @@ XS (XS_weechat_api_window_get_pointer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "window_get_pointer"); PERL_RETURN_EMPTY; @@ -4696,7 +4696,7 @@ XS (XS_weechat_api_window_set_title) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "window_set_title"); PERL_RETURN_ERROR; @@ -4725,7 +4725,7 @@ XS (XS_weechat_api_nicklist_add_group) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_add_group"); PERL_RETURN_EMPTY; @@ -4763,7 +4763,7 @@ XS (XS_weechat_api_nicklist_search_group) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_search_group"); PERL_RETURN_EMPTY; @@ -4798,7 +4798,7 @@ XS (XS_weechat_api_nicklist_add_nick) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_add_nick"); PERL_RETURN_EMPTY; @@ -4840,7 +4840,7 @@ XS (XS_weechat_api_nicklist_search_nick) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_search_nick"); PERL_RETURN_EMPTY; @@ -4875,7 +4875,7 @@ XS (XS_weechat_api_nicklist_remove_group) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_remove_group"); PERL_RETURN_ERROR; @@ -4908,7 +4908,7 @@ XS (XS_weechat_api_nicklist_remove_nick) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_remove_nick"); PERL_RETURN_ERROR; @@ -4940,7 +4940,7 @@ XS (XS_weechat_api_nicklist_remove_all) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "nicklist_remove_all"); PERL_RETURN_ERROR; @@ -4969,7 +4969,7 @@ XS (XS_weechat_api_bar_item_search) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_item_search"); PERL_RETURN_EMPTY; @@ -5034,7 +5034,7 @@ XS (XS_weechat_api_bar_item_new) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_item_new"); PERL_RETURN_EMPTY; @@ -5071,7 +5071,7 @@ XS (XS_weechat_api_bar_item_update) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_item_update"); PERL_RETURN_ERROR; @@ -5099,7 +5099,7 @@ XS (XS_weechat_api_bar_item_remove) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_item_remove"); PERL_RETURN_ERROR; @@ -5130,7 +5130,7 @@ XS (XS_weechat_api_bar_search) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_search"); PERL_RETURN_EMPTY; @@ -5161,7 +5161,7 @@ XS (XS_weechat_api_bar_new) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_new"); PERL_RETURN_EMPTY; @@ -5220,7 +5220,7 @@ XS (XS_weechat_api_bar_set) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_set"); PERL_RETURN_ERROR; @@ -5252,7 +5252,7 @@ XS (XS_weechat_api_bar_update) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_update"); PERL_RETURN_ERROR; @@ -5280,7 +5280,7 @@ XS (XS_weechat_api_bar_remove) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "bar_remove"); PERL_RETURN_ERROR; @@ -5309,7 +5309,7 @@ XS (XS_weechat_api_command) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "command"); PERL_RETURN_ERROR; @@ -5345,7 +5345,7 @@ XS (XS_weechat_api_info_get) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "info_get"); PERL_RETURN_EMPTY; @@ -5379,7 +5379,7 @@ XS (XS_weechat_api_info_get_hashtable) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "info_get_hashtable"); PERL_RETURN_EMPTY; @@ -5419,7 +5419,7 @@ XS (XS_weechat_api_infolist_new) (void) items; (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new"); PERL_RETURN_EMPTY; @@ -5442,7 +5442,7 @@ XS (XS_weechat_api_infolist_new_item) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new_item"); PERL_RETURN_EMPTY; @@ -5473,7 +5473,7 @@ XS (XS_weechat_api_infolist_new_var_integer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new_var_integer"); PERL_RETURN_EMPTY; @@ -5507,7 +5507,7 @@ XS (XS_weechat_api_infolist_new_var_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new_var_string"); PERL_RETURN_EMPTY; @@ -5542,7 +5542,7 @@ XS (XS_weechat_api_infolist_new_var_pointer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer"); PERL_RETURN_EMPTY; @@ -5577,7 +5577,7 @@ XS (XS_weechat_api_infolist_new_var_time) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_new_var_time"); PERL_RETURN_EMPTY; @@ -5611,7 +5611,7 @@ XS (XS_weechat_api_infolist_get) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_get"); PERL_RETURN_EMPTY; @@ -5646,7 +5646,7 @@ XS (XS_weechat_api_infolist_next) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_next"); PERL_RETURN_INT(0); @@ -5675,7 +5675,7 @@ XS (XS_weechat_api_infolist_prev) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_prev"); PERL_RETURN_INT(0); @@ -5704,7 +5704,7 @@ XS (XS_weechat_api_infolist_reset_item_cursor) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); PERL_RETURN_ERROR; @@ -5733,7 +5733,7 @@ XS (XS_weechat_api_infolist_fields) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_fields"); PERL_RETURN_EMPTY; @@ -5763,7 +5763,7 @@ XS (XS_weechat_api_infolist_integer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_integer"); PERL_RETURN_INT(0); @@ -5796,7 +5796,7 @@ XS (XS_weechat_api_infolist_string) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_string"); PERL_RETURN_EMPTY; @@ -5829,7 +5829,7 @@ XS (XS_weechat_api_infolist_pointer) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_pointer"); PERL_RETURN_EMPTY; @@ -5862,7 +5862,7 @@ XS (XS_weechat_api_infolist_time) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_time"); PERL_RETURN_EMPTY; @@ -5894,7 +5894,7 @@ XS (XS_weechat_api_infolist_free) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_free"); PERL_RETURN_ERROR; @@ -5923,7 +5923,7 @@ XS (XS_weechat_api_upgrade_new) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "upgrade_new"); PERL_RETURN_EMPTY; @@ -5956,7 +5956,7 @@ XS (XS_weechat_api_upgrade_write_object) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "upgrade_write_object"); PERL_RETURN_INT(0); @@ -6040,7 +6040,7 @@ XS (XS_weechat_api_upgrade_read) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "upgrade_read"); PERL_RETURN_INT(0); @@ -6078,7 +6078,7 @@ XS (XS_weechat_api_upgrade_close) /* make C compiler happy */ (void) cv; - if (!perl_current_script) + if (!perl_current_script || !perl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "upgrade_close"); PERL_RETURN_ERROR; diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index be252b7e3..36c002468 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -137,7 +137,7 @@ weechat_python_api_plugin_get_name (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "plugin_get_name"); PYTHON_RETURN_EMPTY; @@ -168,7 +168,7 @@ weechat_python_api_charset_set (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "charset_set"); PYTHON_RETURN_ERROR; @@ -201,7 +201,7 @@ weechat_python_api_iconv_to_internal (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "iconv_to_internal"); PYTHON_RETURN_EMPTY; @@ -235,7 +235,7 @@ weechat_python_api_iconv_from_internal (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "iconv_from_internal"); PYTHON_RETURN_EMPTY; @@ -268,7 +268,7 @@ weechat_python_api_gettext (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "gettext"); PYTHON_RETURN_EMPTY; @@ -301,7 +301,7 @@ weechat_python_api_ngettext (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "ngettext"); PYTHON_RETURN_EMPTY; @@ -337,7 +337,7 @@ weechat_python_api_string_match (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_match"); PYTHON_RETURN_INT(0); @@ -375,7 +375,7 @@ weechat_python_api_string_has_highlight (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_has_highlight"); PYTHON_RETURN_INT(0); @@ -411,7 +411,7 @@ weechat_python_api_string_mask_to_regex (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_mask_to_regex"); PYTHON_RETURN_EMPTY; @@ -444,7 +444,7 @@ weechat_python_api_string_remove_color (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_remove_color"); PYTHON_RETURN_EMPTY; @@ -478,7 +478,7 @@ weechat_python_api_string_is_command_char (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_is_command_char"); PYTHON_RETURN_INT(0); @@ -512,7 +512,7 @@ weechat_python_api_string_input_for_buffer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "string_input_for_buffer"); PYTHON_RETURN_EMPTY; @@ -544,7 +544,7 @@ weechat_python_api_mkdir_home (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "mkdir_home"); PYTHON_RETURN_ERROR; @@ -578,7 +578,7 @@ weechat_python_api_mkdir (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "mkdir"); PYTHON_RETURN_ERROR; @@ -613,7 +613,7 @@ weechat_python_api_mkdir_parents (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "mkdir_parents"); PYTHON_RETURN_ERROR; @@ -648,7 +648,7 @@ weechat_python_api_list_new (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_new"); PYTHON_RETURN_EMPTY; @@ -672,7 +672,7 @@ weechat_python_api_list_add (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_add"); PYTHON_RETURN_EMPTY; @@ -710,7 +710,7 @@ weechat_python_api_list_search (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_search"); PYTHON_RETURN_EMPTY; @@ -744,7 +744,7 @@ weechat_python_api_list_casesearch (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_casesearch"); PYTHON_RETURN_EMPTY; @@ -779,7 +779,7 @@ weechat_python_api_list_get (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_get"); PYTHON_RETURN_EMPTY; @@ -811,7 +811,7 @@ weechat_python_api_list_set (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_set"); PYTHON_RETURN_ERROR; @@ -845,7 +845,7 @@ weechat_python_api_list_next (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_next"); PYTHON_RETURN_EMPTY; @@ -877,7 +877,7 @@ weechat_python_api_list_prev (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_prev"); PYTHON_RETURN_EMPTY; @@ -909,7 +909,7 @@ weechat_python_api_list_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_string"); PYTHON_RETURN_EMPTY; @@ -941,7 +941,7 @@ weechat_python_api_list_size (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_size"); PYTHON_RETURN_INT(0); @@ -972,7 +972,7 @@ weechat_python_api_list_remove (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_remove"); PYTHON_RETURN_ERROR; @@ -1005,7 +1005,7 @@ weechat_python_api_list_remove_all (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_remove_all"); PYTHON_RETURN_ERROR; @@ -1036,7 +1036,7 @@ weechat_python_api_list_free (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "list_free"); PYTHON_RETURN_ERROR; @@ -1109,7 +1109,7 @@ weechat_python_api_config_new (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_new"); PYTHON_RETURN_EMPTY; @@ -1385,7 +1385,7 @@ weechat_python_api_config_new_section (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_new_section"); PYTHON_RETURN_EMPTY; @@ -1456,7 +1456,7 @@ weechat_python_api_config_search_section (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_search_section"); PYTHON_RETURN_EMPTY; @@ -1604,7 +1604,7 @@ weechat_python_api_config_new_option (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_new_option"); PYTHON_RETURN_EMPTY; @@ -1675,7 +1675,7 @@ weechat_python_api_config_search_option (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_search_option"); PYTHON_RETURN_EMPTY; @@ -1711,7 +1711,7 @@ weechat_python_api_config_string_to_boolean (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_string_to_boolean"); PYTHON_RETURN_INT(0); @@ -1743,7 +1743,7 @@ weechat_python_api_config_option_reset (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_reset"); PYTHON_RETURN_INT(0); @@ -1777,7 +1777,7 @@ weechat_python_api_config_option_set (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_set"); PYTHON_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -1814,7 +1814,7 @@ weechat_python_api_config_option_set_null (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_set_null"); PYTHON_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -1848,7 +1848,7 @@ weechat_python_api_config_option_unset (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_unset"); PYTHON_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -1879,7 +1879,7 @@ weechat_python_api_config_option_rename (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_rename"); PYTHON_RETURN_ERROR; @@ -1913,7 +1913,7 @@ weechat_python_api_config_option_is_null (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_is_null"); PYTHON_RETURN_INT(1); @@ -1946,7 +1946,7 @@ weechat_python_api_config_option_default_is_null (PyObject *self, PyObject *args /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_default_is_null"); PYTHON_RETURN_INT(1); @@ -1978,7 +1978,7 @@ weechat_python_api_config_boolean (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_boolean"); PYTHON_RETURN_INT(0); @@ -2010,7 +2010,7 @@ weechat_python_api_config_boolean_default (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_boolean_default"); PYTHON_RETURN_INT(0); @@ -2042,7 +2042,7 @@ weechat_python_api_config_integer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_integer"); PYTHON_RETURN_INT(0); @@ -2074,7 +2074,7 @@ weechat_python_api_config_integer_default (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_integer_default"); PYTHON_RETURN_INT(0); @@ -2106,7 +2106,7 @@ weechat_python_api_config_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_string"); PYTHON_RETURN_EMPTY; @@ -2138,7 +2138,7 @@ weechat_python_api_config_string_default (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_string_default"); PYTHON_RETURN_EMPTY; @@ -2170,7 +2170,7 @@ weechat_python_api_config_color (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_color"); PYTHON_RETURN_INT(0); @@ -2202,7 +2202,7 @@ weechat_python_api_config_color_default (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_color_default"); PYTHON_RETURN_INT(0); @@ -2233,7 +2233,7 @@ weechat_python_api_config_write_option (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_write_option"); PYTHON_RETURN_ERROR; @@ -2266,7 +2266,7 @@ weechat_python_api_config_write_line (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_write_line"); PYTHON_RETURN_ERROR; @@ -2303,7 +2303,7 @@ weechat_python_api_config_write (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_write"); PYTHON_RETURN_INT(-1); @@ -2335,7 +2335,7 @@ weechat_python_api_config_read (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_read"); PYTHON_RETURN_INT(-1); @@ -2367,7 +2367,7 @@ weechat_python_api_config_reload (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_reload"); PYTHON_RETURN_INT(-1); @@ -2398,7 +2398,7 @@ weechat_python_api_config_option_free (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_option_free"); PYTHON_RETURN_ERROR; @@ -2432,7 +2432,7 @@ weechat_python_api_config_section_free_options (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_section_free_options"); PYTHON_RETURN_ERROR; @@ -2465,7 +2465,7 @@ weechat_python_api_config_section_free (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_section_free"); PYTHON_RETURN_ERROR; @@ -2498,7 +2498,7 @@ weechat_python_api_config_free (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_free"); PYTHON_RETURN_ERROR; @@ -2532,7 +2532,7 @@ weechat_python_api_config_get (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_get"); PYTHON_RETURN_EMPTY; @@ -2564,7 +2564,7 @@ weechat_python_api_config_get_plugin (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_get_plugin"); PYTHON_RETURN_EMPTY; @@ -2598,7 +2598,7 @@ weechat_python_api_config_is_set_plugin (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_is_set_plugin"); PYTHON_RETURN_INT(0); @@ -2632,7 +2632,7 @@ weechat_python_api_config_set_plugin (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_set_plugin"); PYTHON_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2668,7 +2668,7 @@ weechat_python_api_config_unset_plugin (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_unset_plugin"); PYTHON_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2702,7 +2702,7 @@ weechat_python_api_prefix (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "prefix"); PYTHON_RETURN_EMPTY; @@ -2734,7 +2734,7 @@ weechat_python_api_color (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "color"); PYTHON_RETURN_EMPTY; @@ -2796,7 +2796,7 @@ weechat_python_api_prnt_date_tags (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "prnt_date_tags"); PYTHON_RETURN_ERROR; @@ -2836,7 +2836,7 @@ weechat_python_api_prnt_y (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "prnt_y"); PYTHON_RETURN_ERROR; @@ -2873,7 +2873,7 @@ weechat_python_api_log_print (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "log_print"); PYTHON_RETURN_ERROR; @@ -2953,7 +2953,7 @@ weechat_python_api_hook_command (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_command"); PYTHON_RETURN_EMPTY; @@ -3043,7 +3043,7 @@ weechat_python_api_hook_command_run (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_command_run"); PYTHON_RETURN_EMPTY; @@ -3124,7 +3124,7 @@ weechat_python_api_hook_timer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_timer"); PYTHON_RETURN_EMPTY; @@ -3209,7 +3209,7 @@ weechat_python_api_hook_fd (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_fd"); PYTHON_RETURN_EMPTY; @@ -3301,7 +3301,7 @@ weechat_python_api_hook_process (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_process"); PYTHON_RETURN_EMPTY; @@ -3388,7 +3388,7 @@ weechat_python_api_hook_connect (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_connect"); PYTHON_RETURN_EMPTY; @@ -3506,7 +3506,7 @@ weechat_python_api_hook_print (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_print"); PYTHON_RETURN_EMPTY; @@ -3612,7 +3612,7 @@ weechat_python_api_hook_signal (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_signal"); PYTHON_RETURN_EMPTY; @@ -3651,7 +3651,7 @@ weechat_python_api_hook_signal_send (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_signal_send"); PYTHON_RETURN_ERROR; @@ -3744,7 +3744,7 @@ weechat_python_api_hook_config (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_config"); PYTHON_RETURN_EMPTY; @@ -3829,7 +3829,7 @@ weechat_python_api_hook_completion (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_completion"); PYTHON_RETURN_EMPTY; @@ -3871,7 +3871,7 @@ weechat_python_api_hook_completion_list_add (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_completion_list_add"); PYTHON_RETURN_ERROR; @@ -3940,7 +3940,7 @@ weechat_python_api_hook_modifier (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_modifier"); PYTHON_RETURN_EMPTY; @@ -3979,7 +3979,7 @@ weechat_python_api_hook_modifier_exec (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_modifier_exec"); PYTHON_RETURN_EMPTY; @@ -4042,7 +4042,7 @@ weechat_python_api_hook_info (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_info"); PYTHON_RETURN_EMPTY; @@ -4124,7 +4124,7 @@ weechat_python_api_hook_info_hashtable (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_info_hashtable"); PYTHON_RETURN_EMPTY; @@ -4208,7 +4208,7 @@ weechat_python_api_hook_infolist (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_infolist"); PYTHON_RETURN_EMPTY; @@ -4254,7 +4254,7 @@ weechat_python_api_unhook (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "unhook"); PYTHON_RETURN_ERROR; @@ -4286,7 +4286,7 @@ weechat_python_api_unhook_all (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "unhook_all"); PYTHON_RETURN_ERROR; @@ -4391,7 +4391,7 @@ weechat_python_api_buffer_new (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_new"); PYTHON_RETURN_EMPTY; @@ -4437,7 +4437,7 @@ weechat_python_api_buffer_search (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_search"); PYTHON_RETURN_EMPTY; @@ -4471,7 +4471,7 @@ weechat_python_api_buffer_search_main (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_search_main"); PYTHON_RETURN_EMPTY; @@ -4496,7 +4496,7 @@ weechat_python_api_current_buffer (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "current_buffer"); PYTHON_RETURN_EMPTY; @@ -4519,7 +4519,7 @@ weechat_python_api_buffer_clear (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_clear"); PYTHON_RETURN_ERROR; @@ -4550,7 +4550,7 @@ weechat_python_api_buffer_close (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_close"); PYTHON_RETURN_ERROR; @@ -4583,7 +4583,7 @@ weechat_python_api_buffer_merge (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_merge"); PYTHON_RETURN_ERROR; @@ -4618,7 +4618,7 @@ weechat_python_api_buffer_unmerge (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_unmerge"); PYTHON_RETURN_ERROR; @@ -4651,7 +4651,7 @@ weechat_python_api_buffer_get_integer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_get_integer"); PYTHON_RETURN_INT(-1); @@ -4684,7 +4684,7 @@ weechat_python_api_buffer_get_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_get_string"); PYTHON_RETURN_ERROR; @@ -4717,7 +4717,7 @@ weechat_python_api_buffer_get_pointer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_get_pointer"); PYTHON_RETURN_EMPTY; @@ -4750,7 +4750,7 @@ weechat_python_api_buffer_set (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_set"); PYTHON_RETURN_ERROR; @@ -4787,7 +4787,7 @@ weechat_python_api_buffer_string_replace_local_var (PyObject *self, PyObject *ar /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var"); PYTHON_RETURN_ERROR; @@ -4821,7 +4821,7 @@ weechat_python_api_current_window (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "current_window"); PYTHON_RETURN_EMPTY; @@ -4845,7 +4845,7 @@ weechat_python_api_window_get_integer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "window_get_integer"); PYTHON_RETURN_INT(-1); @@ -4878,7 +4878,7 @@ weechat_python_api_window_get_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "window_get_string"); PYTHON_RETURN_EMPTY; @@ -4911,7 +4911,7 @@ weechat_python_api_window_get_pointer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "window_get_pointer"); PYTHON_RETURN_EMPTY; @@ -4944,7 +4944,7 @@ weechat_python_api_window_set_title (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "window_set_title"); PYTHON_RETURN_ERROR; @@ -4977,7 +4977,7 @@ weechat_python_api_nicklist_add_group (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_add_group"); PYTHON_RETURN_EMPTY; @@ -5018,7 +5018,7 @@ weechat_python_api_nicklist_search_group (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_search_group"); PYTHON_RETURN_EMPTY; @@ -5055,7 +5055,7 @@ weechat_python_api_nicklist_add_nick (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_add_nick"); PYTHON_RETURN_EMPTY; @@ -5100,7 +5100,7 @@ weechat_python_api_nicklist_search_nick (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_search_nick"); PYTHON_RETURN_EMPTY; @@ -5135,7 +5135,7 @@ weechat_python_api_nicklist_remove_group (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_remove_group"); PYTHON_RETURN_ERROR; @@ -5168,7 +5168,7 @@ weechat_python_api_nicklist_remove_nick (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_remove_nick"); PYTHON_RETURN_ERROR; @@ -5201,7 +5201,7 @@ weechat_python_api_nicklist_remove_all (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "nicklist_remove_all"); PYTHON_RETURN_ERROR; @@ -5233,7 +5233,7 @@ weechat_python_api_bar_item_search (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_item_search"); PYTHON_RETURN_EMPTY; @@ -5301,7 +5301,7 @@ weechat_python_api_bar_item_new (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_item_new"); PYTHON_RETURN_EMPTY; @@ -5339,7 +5339,7 @@ weechat_python_api_bar_item_update (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_item_update"); PYTHON_RETURN_ERROR; @@ -5370,7 +5370,7 @@ weechat_python_api_bar_item_remove (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_item_remove"); PYTHON_RETURN_ERROR; @@ -5404,7 +5404,7 @@ weechat_python_api_bar_search (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_search"); PYTHON_RETURN_EMPTY; @@ -5438,7 +5438,7 @@ weechat_python_api_bar_new (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_new"); PYTHON_RETURN_EMPTY; @@ -5500,7 +5500,7 @@ weechat_python_api_bar_set (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_set"); PYTHON_RETURN_ERROR; @@ -5535,7 +5535,7 @@ weechat_python_api_bar_update (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_item"); PYTHON_RETURN_ERROR; @@ -5566,7 +5566,7 @@ weechat_python_api_bar_remove (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "bar_remove"); PYTHON_RETURN_ERROR; @@ -5597,7 +5597,7 @@ weechat_python_api_command (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "command"); PYTHON_RETURN_ERROR; @@ -5633,7 +5633,7 @@ weechat_python_api_info_get (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "info_get"); PYTHON_RETURN_EMPTY; @@ -5666,7 +5666,7 @@ weechat_python_api_info_get_hashtable (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "info_get_hashtable"); PYTHON_RETURN_EMPTY; @@ -5707,7 +5707,7 @@ weechat_python_api_infolist_new (PyObject *self, PyObject *args) (void) self; (void) args; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new"); PYTHON_RETURN_EMPTY; @@ -5731,7 +5731,7 @@ weechat_python_api_infolist_new_item (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new_item"); PYTHON_RETURN_EMPTY; @@ -5765,7 +5765,7 @@ weechat_python_api_infolist_new_var_integer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new_var_integer"); PYTHON_RETURN_EMPTY; @@ -5802,7 +5802,7 @@ weechat_python_api_infolist_new_var_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new_var_string"); PYTHON_RETURN_EMPTY; @@ -5839,7 +5839,7 @@ weechat_python_api_infolist_new_var_pointer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer"); PYTHON_RETURN_EMPTY; @@ -5877,7 +5877,7 @@ weechat_python_api_infolist_new_var_time (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_new_var_time"); PYTHON_RETURN_EMPTY; @@ -5913,7 +5913,7 @@ weechat_python_api_infolist_get (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_get"); PYTHON_RETURN_EMPTY; @@ -5949,7 +5949,7 @@ weechat_python_api_infolist_next (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_next"); PYTHON_RETURN_INT(0); @@ -5981,7 +5981,7 @@ weechat_python_api_infolist_prev (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_prev"); PYTHON_RETURN_INT(0); @@ -6013,7 +6013,7 @@ weechat_python_api_infolist_reset_item_cursor (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); PYTHON_RETURN_ERROR; @@ -6045,7 +6045,7 @@ weechat_python_api_infolist_fields (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_fields"); PYTHON_RETURN_EMPTY; @@ -6077,7 +6077,7 @@ weechat_python_api_infolist_integer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_integer"); PYTHON_RETURN_INT(0); @@ -6111,7 +6111,7 @@ weechat_python_api_infolist_string (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_string"); PYTHON_RETURN_EMPTY; @@ -6145,7 +6145,7 @@ weechat_python_api_infolist_pointer (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_pointer"); PYTHON_RETURN_EMPTY; @@ -6180,7 +6180,7 @@ weechat_python_api_infolist_time (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_time"); PYTHON_RETURN_EMPTY; @@ -6215,7 +6215,7 @@ weechat_python_api_infolist_free (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "infolist_free"); PYTHON_RETURN_ERROR; @@ -6248,7 +6248,7 @@ weechat_python_api_upgrade_new (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "upgrade_new"); PYTHON_RETURN_EMPTY; @@ -6281,7 +6281,7 @@ weechat_python_api_upgrade_write_object (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "upgrade_write_object"); PYTHON_RETURN_INT(0); @@ -6366,7 +6366,7 @@ weechat_python_api_upgrade_read (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "upgrade_read"); PYTHON_RETURN_INT(0); @@ -6404,7 +6404,7 @@ weechat_python_api_upgrade_close (PyObject *self, PyObject *args) /* make C compiler happy */ (void) self; - if (!python_current_script) + if (!python_current_script || !python_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "upgrade_close"); PYTHON_RETURN_ERROR; diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 4e13aba34..57ae8d196 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -155,7 +155,7 @@ weechat_ruby_api_plugin_get_name (VALUE class, VALUE plugin) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "plugin_get_name"); RUBY_RETURN_EMPTY; @@ -190,7 +190,7 @@ weechat_ruby_api_charset_set (VALUE class, VALUE charset) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "charset_set"); RUBY_RETURN_ERROR; @@ -226,7 +226,7 @@ weechat_ruby_api_iconv_to_internal (VALUE class, VALUE charset, VALUE string) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "iconv_to_internal"); RUBY_RETURN_EMPTY; @@ -266,7 +266,7 @@ weechat_ruby_api_iconv_from_internal (VALUE class, VALUE charset, VALUE string) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "iconv_from_internal"); RUBY_RETURN_EMPTY; @@ -305,7 +305,7 @@ weechat_ruby_api_gettext (VALUE class, VALUE string) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "gettext"); RUBY_RETURN_EMPTY; @@ -343,7 +343,7 @@ weechat_ruby_api_ngettext (VALUE class, VALUE single, VALUE plural, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "ngettext"); RUBY_RETURN_EMPTY; @@ -388,7 +388,7 @@ weechat_ruby_api_string_match (VALUE class, VALUE string, VALUE mask, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_match"); RUBY_RETURN_INT(0); @@ -435,7 +435,7 @@ weechat_ruby_api_string_has_highlight (VALUE class, VALUE string, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_has_highlight"); RUBY_RETURN_INT(0); @@ -477,7 +477,7 @@ weechat_ruby_api_string_mask_to_regex (VALUE class, VALUE mask) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_mask_to_regex"); RUBY_RETURN_EMPTY; @@ -514,7 +514,7 @@ weechat_ruby_api_string_remove_color (VALUE class, VALUE string, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_remove_color"); RUBY_RETURN_EMPTY; @@ -554,7 +554,7 @@ weechat_ruby_api_string_is_command_char (VALUE class, VALUE string) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_is_command_char"); RUBY_RETURN_INT(0); @@ -592,7 +592,7 @@ weechat_ruby_api_string_input_for_buffer (VALUE class, VALUE string) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "string_input_for_buffer"); RUBY_RETURN_EMPTY; @@ -628,7 +628,7 @@ weechat_ruby_api_mkdir_home (VALUE class, VALUE directory, VALUE mode) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "mkdir_home"); RUBY_RETURN_ERROR; @@ -668,7 +668,7 @@ weechat_ruby_api_mkdir (VALUE class, VALUE directory, VALUE mode) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "mkdir"); RUBY_RETURN_ERROR; @@ -709,7 +709,7 @@ weechat_ruby_api_mkdir_parents (VALUE class, VALUE directory, VALUE mode) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "mkdir_parents"); RUBY_RETURN_ERROR; @@ -748,7 +748,7 @@ weechat_ruby_api_list_new (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_new"); RUBY_RETURN_EMPTY; @@ -772,7 +772,7 @@ weechat_ruby_api_list_add (VALUE class, VALUE weelist, VALUE data, VALUE where, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_add"); RUBY_RETURN_EMPTY; @@ -819,7 +819,7 @@ weechat_ruby_api_list_search (VALUE class, VALUE weelist, VALUE data) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_search"); RUBY_RETURN_EMPTY; @@ -858,7 +858,7 @@ weechat_ruby_api_list_casesearch (VALUE class, VALUE weelist, VALUE data) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_casesearch"); RUBY_RETURN_EMPTY; @@ -898,7 +898,7 @@ weechat_ruby_api_list_get (VALUE class, VALUE weelist, VALUE position) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_get"); RUBY_RETURN_EMPTY; @@ -937,7 +937,7 @@ weechat_ruby_api_list_set (VALUE class, VALUE item, VALUE new_value) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_set"); RUBY_RETURN_ERROR; @@ -976,7 +976,7 @@ weechat_ruby_api_list_next (VALUE class, VALUE item) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_next"); RUBY_RETURN_EMPTY; @@ -1011,7 +1011,7 @@ weechat_ruby_api_list_prev (VALUE class, VALUE item) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_prev"); RUBY_RETURN_EMPTY; @@ -1047,7 +1047,7 @@ weechat_ruby_api_list_string (VALUE class, VALUE item) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_string"); RUBY_RETURN_EMPTY; @@ -1083,7 +1083,7 @@ weechat_ruby_api_list_size (VALUE class, VALUE weelist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_size"); RUBY_RETURN_INT(0); @@ -1118,7 +1118,7 @@ weechat_ruby_api_list_remove (VALUE class, VALUE weelist, VALUE item) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_remove"); RUBY_RETURN_ERROR; @@ -1157,7 +1157,7 @@ weechat_ruby_api_list_remove_all (VALUE class, VALUE weelist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_remove_all"); RUBY_RETURN_ERROR; @@ -1192,7 +1192,7 @@ weechat_ruby_api_list_free (VALUE class, VALUE weelist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "list_free"); RUBY_RETURN_ERROR; @@ -1270,7 +1270,7 @@ weechat_ruby_api_config_new (VALUE class, VALUE name, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_new"); RUBY_RETURN_EMPTY; @@ -1567,7 +1567,7 @@ weechat_ruby_api_config_new_section (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_new_section"); RUBY_RETURN_EMPTY; @@ -1668,7 +1668,7 @@ weechat_ruby_api_config_search_section (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_search_section"); RUBY_RETURN_EMPTY; @@ -1832,7 +1832,7 @@ weechat_ruby_api_config_new_option (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_new_option"); RUBY_RETURN_EMPTY; @@ -1943,7 +1943,7 @@ weechat_ruby_api_config_search_option (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_search_option"); RUBY_RETURN_EMPTY; @@ -1987,7 +1987,7 @@ weechat_ruby_api_config_string_to_boolean (VALUE class, VALUE text) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_string_to_boolean"); RUBY_RETURN_INT(0); @@ -2024,7 +2024,7 @@ weechat_ruby_api_config_option_reset (VALUE class, VALUE option, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_reset"); RUBY_RETURN_INT(0); @@ -2065,7 +2065,7 @@ weechat_ruby_api_config_option_set (VALUE class, VALUE option, VALUE new_value, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_set"); RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2111,7 +2111,7 @@ weechat_ruby_api_config_option_set_null (VALUE class, VALUE option, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_set_null"); RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2151,7 +2151,7 @@ weechat_ruby_api_config_option_unset (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_unset"); RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2187,7 +2187,7 @@ weechat_ruby_api_config_option_rename (VALUE class, VALUE option, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_rename"); RUBY_RETURN_ERROR; @@ -2227,7 +2227,7 @@ weechat_ruby_api_config_option_is_null (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_is_null"); RUBY_RETURN_INT(1); @@ -2263,7 +2263,7 @@ weechat_ruby_api_config_option_default_is_null (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_default_is_null"); RUBY_RETURN_INT(1); @@ -2299,7 +2299,7 @@ weechat_ruby_api_config_boolean (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_boolean"); RUBY_RETURN_INT(0); @@ -2335,7 +2335,7 @@ weechat_ruby_api_config_boolean_default (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_boolean_default"); RUBY_RETURN_INT(0); @@ -2371,7 +2371,7 @@ weechat_ruby_api_config_integer (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_integer"); RUBY_RETURN_INT(0); @@ -2407,7 +2407,7 @@ weechat_ruby_api_config_integer_default (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_integer_default"); RUBY_RETURN_INT(0); @@ -2443,7 +2443,7 @@ weechat_ruby_api_config_string (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_string"); RUBY_RETURN_EMPTY; @@ -2479,7 +2479,7 @@ weechat_ruby_api_config_string_default (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_string_default"); RUBY_RETURN_EMPTY; @@ -2515,7 +2515,7 @@ weechat_ruby_api_config_color (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_color"); RUBY_RETURN_INT(0); @@ -2551,7 +2551,7 @@ weechat_ruby_api_config_color_default (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_color_default"); RUBY_RETURN_INT(0); @@ -2587,7 +2587,7 @@ weechat_ruby_api_config_write_option (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_write_option"); RUBY_RETURN_ERROR; @@ -2627,7 +2627,7 @@ weechat_ruby_api_config_write_line (VALUE class, VALUE config_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_write_line"); RUBY_RETURN_ERROR; @@ -2672,7 +2672,7 @@ weechat_ruby_api_config_write (VALUE class, VALUE config_file) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_write"); RUBY_RETURN_INT(-1); @@ -2708,7 +2708,7 @@ weechat_ruby_api_config_read (VALUE class, VALUE config_file) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_read"); RUBY_RETURN_INT(-1); @@ -2744,7 +2744,7 @@ weechat_ruby_api_config_reload (VALUE class, VALUE config_file) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_reload"); RUBY_RETURN_INT(-1); @@ -2779,7 +2779,7 @@ weechat_ruby_api_config_option_free (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_option_free"); RUBY_RETURN_ERROR; @@ -2817,7 +2817,7 @@ weechat_ruby_api_config_section_free_options (VALUE class, VALUE section) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_section_free_options"); RUBY_RETURN_ERROR; @@ -2854,7 +2854,7 @@ weechat_ruby_api_config_section_free (VALUE class, VALUE section) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_section_free"); RUBY_RETURN_ERROR; @@ -2891,7 +2891,7 @@ weechat_ruby_api_config_free (VALUE class, VALUE config_file) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_free"); RUBY_RETURN_ERROR; @@ -2929,7 +2929,7 @@ weechat_ruby_api_config_get (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_get"); RUBY_RETURN_EMPTY; @@ -2963,7 +2963,7 @@ weechat_ruby_api_config_get_plugin (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_get_plugin"); RUBY_RETURN_EMPTY; @@ -2999,7 +2999,7 @@ weechat_ruby_api_config_is_set_plugin (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_is_set_plugin"); RUBY_RETURN_INT(0); @@ -3035,7 +3035,7 @@ weechat_ruby_api_config_set_plugin (VALUE class, VALUE option, VALUE value) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_set_plugin"); RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -3074,7 +3074,7 @@ weechat_ruby_api_config_unset_plugin (VALUE class, VALUE option) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "config_unset_plugin"); RUBY_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -3110,7 +3110,7 @@ weechat_ruby_api_prefix (VALUE class, VALUE prefix) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "prefix"); RUBY_RETURN_EMPTY; @@ -3146,7 +3146,7 @@ weechat_ruby_api_color (VALUE class, VALUE color) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "color"); RUBY_RETURN_EMPTY; @@ -3219,7 +3219,7 @@ weechat_ruby_api_print_date_tags (VALUE class, VALUE buffer, VALUE date, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "print_date_tags"); RUBY_RETURN_ERROR; @@ -3269,7 +3269,7 @@ weechat_ruby_api_print_y (VALUE class, VALUE buffer, VALUE y, VALUE message) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "print_y"); RUBY_RETURN_ERROR; @@ -3314,7 +3314,7 @@ weechat_ruby_api_log_print (VALUE class, VALUE message) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "log_print"); RUBY_RETURN_ERROR; @@ -3400,7 +3400,7 @@ weechat_ruby_api_hook_command (VALUE class, VALUE command, VALUE description, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_command"); RUBY_RETURN_EMPTY; @@ -3508,7 +3508,7 @@ weechat_ruby_api_hook_command_run (VALUE class, VALUE command, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_command_run"); RUBY_RETURN_EMPTY; @@ -3598,7 +3598,7 @@ weechat_ruby_api_hook_timer (VALUE class, VALUE interval, VALUE align_second, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_timer"); RUBY_RETURN_EMPTY; @@ -3696,7 +3696,7 @@ weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_fd"); RUBY_RETURN_EMPTY; @@ -3803,7 +3803,7 @@ weechat_ruby_api_hook_process (VALUE class, VALUE command, VALUE timeout, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_process"); RUBY_RETURN_EMPTY; @@ -3904,7 +3904,7 @@ weechat_ruby_api_hook_connect (VALUE class, VALUE proxy, VALUE address, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_connect"); RUBY_RETURN_EMPTY; @@ -4043,7 +4043,7 @@ weechat_ruby_api_hook_print (VALUE class, VALUE buffer, VALUE tags, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_print"); RUBY_RETURN_EMPTY; @@ -4164,7 +4164,7 @@ weechat_ruby_api_hook_signal (VALUE class, VALUE signal, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_signal"); RUBY_RETURN_EMPTY; @@ -4212,7 +4212,7 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_signal_send"); RUBY_RETURN_ERROR; @@ -4313,7 +4313,7 @@ weechat_ruby_api_hook_config (VALUE class, VALUE option, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_config"); RUBY_RETURN_EMPTY; @@ -4408,7 +4408,7 @@ weechat_ruby_api_hook_completion (VALUE class, VALUE completion, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_completion"); RUBY_RETURN_EMPTY; @@ -4462,7 +4462,7 @@ weechat_ruby_api_hook_completion_list_add (VALUE class, VALUE completion, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_completion_list_add"); RUBY_RETURN_ERROR; @@ -4542,7 +4542,7 @@ weechat_ruby_api_hook_modifier (VALUE class, VALUE modifier, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_modifier"); RUBY_RETURN_EMPTY; @@ -4590,7 +4590,7 @@ weechat_ruby_api_hook_modifier_exec (VALUE class, VALUE modifier, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_modifier_exec"); RUBY_RETURN_EMPTY; @@ -4663,7 +4663,7 @@ weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE description, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_info"); RUBY_RETURN_EMPTY; @@ -4754,7 +4754,7 @@ weechat_ruby_api_hook_info_hashtable (VALUE class, VALUE info_name, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_info_hashtable"); RUBY_RETURN_EMPTY; @@ -4854,7 +4854,7 @@ weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_infolist"); RUBY_RETURN_EMPTY; @@ -4914,7 +4914,7 @@ weechat_ruby_api_unhook (VALUE class, VALUE hook) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "unhook"); RUBY_RETURN_ERROR; @@ -4949,7 +4949,7 @@ weechat_ruby_api_unhook_all (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "unhook_all"); RUBY_RETURN_ERROR; @@ -5058,7 +5058,7 @@ weechat_ruby_api_buffer_new (VALUE class, VALUE name, VALUE function_input, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_new"); RUBY_RETURN_EMPTY; @@ -5115,7 +5115,7 @@ weechat_ruby_api_buffer_search (VALUE class, VALUE plugin, VALUE name) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_search"); RUBY_RETURN_EMPTY; @@ -5154,7 +5154,7 @@ weechat_ruby_api_buffer_search_main (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_search_main"); RUBY_RETURN_EMPTY; @@ -5178,7 +5178,7 @@ weechat_ruby_api_current_buffer (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "current_buffer"); RUBY_RETURN_EMPTY; @@ -5201,7 +5201,7 @@ weechat_ruby_api_buffer_clear (VALUE class, VALUE buffer) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_clear"); RUBY_RETURN_ERROR; @@ -5236,7 +5236,7 @@ weechat_ruby_api_buffer_close (VALUE class, VALUE buffer) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_close"); RUBY_RETURN_ERROR; @@ -5273,7 +5273,7 @@ weechat_ruby_api_buffer_merge (VALUE class, VALUE buffer, VALUE target_buffer) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_merge"); RUBY_RETURN_ERROR; @@ -5314,7 +5314,7 @@ weechat_ruby_api_buffer_unmerge (VALUE class, VALUE buffer, VALUE number) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_unmerge"); RUBY_RETURN_ERROR; @@ -5353,7 +5353,7 @@ weechat_ruby_api_buffer_get_integer (VALUE class, VALUE buffer, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_get_integer"); RUBY_RETURN_INT(-1); @@ -5390,7 +5390,7 @@ weechat_ruby_api_buffer_get_string (VALUE class, VALUE buffer, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_get_string"); RUBY_RETURN_EMPTY; @@ -5427,7 +5427,7 @@ weechat_ruby_api_buffer_get_pointer (VALUE class, VALUE buffer, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_get_pointer"); RUBY_RETURN_EMPTY; @@ -5464,7 +5464,7 @@ weechat_ruby_api_buffer_set (VALUE class, VALUE buffer, VALUE property, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_set"); RUBY_RETURN_ERROR; @@ -5505,7 +5505,7 @@ weechat_ruby_api_buffer_string_replace_local_var (VALUE class, VALUE buffer, VAL /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var"); RUBY_RETURN_ERROR; @@ -5544,7 +5544,7 @@ weechat_ruby_api_current_window (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "current_window"); RUBY_RETURN_EMPTY; @@ -5568,7 +5568,7 @@ weechat_ruby_api_window_get_integer (VALUE class, VALUE window, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "window_get_integer"); RUBY_RETURN_INT(-1); @@ -5605,7 +5605,7 @@ weechat_ruby_api_window_get_string (VALUE class, VALUE window, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "window_get_string"); RUBY_RETURN_EMPTY; @@ -5642,7 +5642,7 @@ weechat_ruby_api_window_get_pointer (VALUE class, VALUE window, VALUE property) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "window_get_pointer"); RUBY_RETURN_EMPTY; @@ -5678,7 +5678,7 @@ weechat_ruby_api_window_set_title (VALUE class, VALUE title) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "window_set_title"); RUBY_RETURN_ERROR; @@ -5715,7 +5715,7 @@ weechat_ruby_api_nicklist_add_group (VALUE class, VALUE buffer, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_add_group"); RUBY_RETURN_EMPTY; @@ -5769,7 +5769,7 @@ weechat_ruby_api_nicklist_search_group (VALUE class, VALUE buffer, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_search_group"); RUBY_RETURN_EMPTY; @@ -5817,7 +5817,7 @@ weechat_ruby_api_nicklist_add_nick (VALUE class, VALUE buffer, VALUE group, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_add_nick"); RUBY_RETURN_EMPTY; @@ -5879,7 +5879,7 @@ weechat_ruby_api_nicklist_search_nick (VALUE class, VALUE buffer, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_search_nick"); RUBY_RETURN_EMPTY; @@ -5922,7 +5922,7 @@ weechat_ruby_api_nicklist_remove_group (VALUE class, VALUE buffer, VALUE group) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_remove_group"); RUBY_RETURN_ERROR; @@ -5958,7 +5958,7 @@ weechat_ruby_api_nicklist_remove_nick (VALUE class, VALUE buffer, VALUE nick) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_remove_nick"); RUBY_RETURN_ERROR; @@ -5994,7 +5994,7 @@ weechat_ruby_api_nicklist_remove_all (VALUE class, VALUE buffer) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "nicklist_remove_all"); RUBY_RETURN_ERROR; @@ -6028,7 +6028,7 @@ weechat_ruby_api_bar_item_search (VALUE class, VALUE name) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_item_search"); RUBY_RETURN_EMPTY; @@ -6101,7 +6101,7 @@ weechat_ruby_api_bar_item_new (VALUE class, VALUE name, VALUE function, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_item_new"); RUBY_RETURN_EMPTY; @@ -6147,7 +6147,7 @@ weechat_ruby_api_bar_item_update (VALUE class, VALUE name) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_item_update"); RUBY_RETURN_ERROR; @@ -6180,7 +6180,7 @@ weechat_ruby_api_bar_item_remove (VALUE class, VALUE item) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_item_remove"); RUBY_RETURN_ERROR; @@ -6216,7 +6216,7 @@ weechat_ruby_api_bar_search (VALUE class, VALUE name) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_search"); RUBY_RETURN_EMPTY; @@ -6260,7 +6260,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_new"); RUBY_RETURN_EMPTY; @@ -6355,7 +6355,7 @@ weechat_ruby_api_bar_set (VALUE class, VALUE bar, VALUE property, VALUE value) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_set"); RUBY_RETURN_ERROR; @@ -6394,7 +6394,7 @@ weechat_ruby_api_bar_update (VALUE class, VALUE name) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_update"); RUBY_RETURN_ERROR; @@ -6427,7 +6427,7 @@ weechat_ruby_api_bar_remove (VALUE class, VALUE bar) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "bar_remove"); RUBY_RETURN_ERROR; @@ -6460,7 +6460,7 @@ weechat_ruby_api_command (VALUE class, VALUE buffer, VALUE command) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "command"); RUBY_RETURN_ERROR; @@ -6499,7 +6499,7 @@ weechat_ruby_api_info_get (VALUE class, VALUE info_name, VALUE arguments) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "info_get"); RUBY_RETURN_EMPTY; @@ -6537,7 +6537,7 @@ weechat_ruby_api_info_get_hashtable (VALUE class, VALUE info_name, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "info_get_hashtable"); RUBY_RETURN_EMPTY; @@ -6580,7 +6580,7 @@ weechat_ruby_api_infolist_new (VALUE class) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new"); RUBY_RETURN_EMPTY; @@ -6604,7 +6604,7 @@ weechat_ruby_api_infolist_new_item (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new_item"); RUBY_RETURN_EMPTY; @@ -6641,7 +6641,7 @@ weechat_ruby_api_infolist_new_var_integer (VALUE class, VALUE infolist, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new_var_integer"); RUBY_RETURN_EMPTY; @@ -6683,7 +6683,7 @@ weechat_ruby_api_infolist_new_var_string (VALUE class, VALUE infolist, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new_var_string"); RUBY_RETURN_EMPTY; @@ -6725,7 +6725,7 @@ weechat_ruby_api_infolist_new_var_pointer (VALUE class, VALUE infolist, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer"); RUBY_RETURN_EMPTY; @@ -6767,7 +6767,7 @@ weechat_ruby_api_infolist_new_var_time (VALUE class, VALUE infolist, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_new_var_time"); RUBY_RETURN_EMPTY; @@ -6808,7 +6808,7 @@ weechat_ruby_api_infolist_get (VALUE class, VALUE name, VALUE pointer, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_get"); RUBY_RETURN_EMPTY; @@ -6848,7 +6848,7 @@ weechat_ruby_api_infolist_next (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_next"); RUBY_RETURN_INT(0); @@ -6882,7 +6882,7 @@ weechat_ruby_api_infolist_prev (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_prev"); RUBY_RETURN_INT(0); @@ -6916,7 +6916,7 @@ weechat_ruby_api_infolist_reset_item_cursor (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); RUBY_RETURN_ERROR; @@ -6950,7 +6950,7 @@ weechat_ruby_api_infolist_fields (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_fields"); RUBY_RETURN_EMPTY; @@ -6984,7 +6984,7 @@ weechat_ruby_api_infolist_integer (VALUE class, VALUE infolist, VALUE variable) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_integer"); RUBY_RETURN_INT(0); @@ -7020,7 +7020,7 @@ weechat_ruby_api_infolist_string (VALUE class, VALUE infolist, VALUE variable) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_string"); RUBY_RETURN_EMPTY; @@ -7056,7 +7056,7 @@ weechat_ruby_api_infolist_pointer (VALUE class, VALUE infolist, VALUE variable) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_pointer"); RUBY_RETURN_EMPTY; @@ -7093,7 +7093,7 @@ weechat_ruby_api_infolist_time (VALUE class, VALUE infolist, VALUE variable) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_time"); RUBY_RETURN_EMPTY; @@ -7130,7 +7130,7 @@ weechat_ruby_api_infolist_free (VALUE class, VALUE infolist) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "infolist_free"); RUBY_RETURN_ERROR; @@ -7165,7 +7165,7 @@ weechat_ruby_api_upgrade_new (VALUE class, VALUE filename, VALUE write) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "upgrade_new"); RUBY_RETURN_EMPTY; @@ -7206,7 +7206,7 @@ weechat_ruby_api_upgrade_write_object (VALUE class, VALUE upgrade_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "upgrade_write_object"); RUBY_RETURN_INT(0); @@ -7296,7 +7296,7 @@ weechat_ruby_api_upgrade_read (VALUE class, VALUE upgrade_file, /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "upgrade_read"); RUBY_RETURN_INT(0); @@ -7342,7 +7342,7 @@ weechat_ruby_api_upgrade_close (VALUE class, VALUE upgrade_file) /* make C compiler happy */ (void) class; - if (!ruby_current_script) + if (!ruby_current_script || !ruby_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "upgrade_close"); RUBY_RETURN_ERROR; diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c index 90ea1be46..c7b9c5457 100644 --- a/src/plugins/scripts/tcl/weechat-tcl-api.c +++ b/src/plugins/scripts/tcl/weechat-tcl-api.c @@ -250,7 +250,7 @@ weechat_tcl_api_plugin_get_name (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "plugin_get_name"); TCL_RETURN_EMPTY; @@ -283,7 +283,7 @@ weechat_tcl_api_charset_set (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "charset_set"); TCL_RETURN_ERROR; @@ -317,7 +317,7 @@ weechat_tcl_api_iconv_to_internal (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "iconv_to_internal"); TCL_RETURN_EMPTY; @@ -353,7 +353,7 @@ weechat_tcl_api_iconv_from_internal (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "iconv_from_internal"); TCL_RETURN_EMPTY; @@ -388,7 +388,7 @@ weechat_tcl_api_gettext (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "gettext"); TCL_RETURN_EMPTY; @@ -421,7 +421,7 @@ weechat_tcl_api_ngettext (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "ngettext"); TCL_RETURN_EMPTY; @@ -464,7 +464,7 @@ weechat_tcl_api_string_match (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_match"); TCL_RETURN_INT(0); @@ -510,7 +510,7 @@ weechat_tcl_api_string_has_highlight (ClientData clientData, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_has_highlight"); TCL_RETURN_INT(0); @@ -549,7 +549,7 @@ weechat_tcl_api_string_mask_to_regex (ClientData clientData, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_mask_to_regex"); TCL_RETURN_EMPTY; @@ -583,7 +583,7 @@ weechat_tcl_api_string_remove_color (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_remove_color"); TCL_RETURN_EMPTY; @@ -618,7 +618,7 @@ weechat_tcl_api_string_is_command_char (ClientData clientData, Tcl_Interp *inter /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_is_command_char"); TCL_RETURN_INT(0); @@ -652,7 +652,7 @@ weechat_tcl_api_string_input_for_buffer (ClientData clientData, Tcl_Interp *inte /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "string_input_for_buffer"); TCL_RETURN_EMPTY; @@ -683,7 +683,7 @@ weechat_tcl_api_mkdir_home (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "mkdir_home"); TCL_RETURN_ERROR; @@ -722,7 +722,7 @@ weechat_tcl_api_mkdir (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "mkdir"); TCL_RETURN_ERROR; @@ -762,7 +762,7 @@ weechat_tcl_api_mkdir_parents (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "mkdir_parents"); TCL_RETURN_ERROR; @@ -803,7 +803,7 @@ weechat_tcl_api_list_new (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_new"); TCL_RETURN_EMPTY; @@ -830,7 +830,7 @@ weechat_tcl_api_list_add (ClientData clientData, Tcl_Interp *interp, (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_add"); TCL_RETURN_EMPTY; @@ -870,7 +870,7 @@ weechat_tcl_api_list_search (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_search"); TCL_RETURN_EMPTY; @@ -906,7 +906,7 @@ weechat_tcl_api_list_casesearch (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_casesearch"); TCL_RETURN_EMPTY; @@ -942,7 +942,7 @@ weechat_tcl_api_list_get (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_get"); TCL_RETURN_EMPTY; @@ -981,7 +981,7 @@ weechat_tcl_api_list_set (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_set"); TCL_RETURN_ERROR; @@ -1016,7 +1016,7 @@ weechat_tcl_api_list_next (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_next"); TCL_RETURN_EMPTY; @@ -1048,7 +1048,7 @@ weechat_tcl_api_list_prev (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_prev"); TCL_RETURN_EMPTY; @@ -1080,7 +1080,7 @@ weechat_tcl_api_list_string (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_string"); TCL_RETURN_EMPTY; @@ -1112,7 +1112,7 @@ weechat_tcl_api_list_size (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_size"); TCL_RETURN_INT(0); @@ -1144,7 +1144,7 @@ weechat_tcl_api_list_remove (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_remove"); TCL_RETURN_ERROR; @@ -1177,7 +1177,7 @@ weechat_tcl_api_list_remove_all (ClientData clientData, Tcl_Interp *interp, (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_remove_all"); TCL_RETURN_ERROR; @@ -1208,7 +1208,7 @@ weechat_tcl_api_list_free (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "list_free"); TCL_RETURN_ERROR; @@ -1282,7 +1282,7 @@ weechat_tcl_api_config_new (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_new"); TCL_RETURN_EMPTY; @@ -1563,7 +1563,7 @@ weechat_tcl_api_config_new_section (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_new_section"); TCL_RETURN_EMPTY; @@ -1635,7 +1635,7 @@ weechat_tcl_api_config_search_section (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_search_section"); TCL_RETURN_EMPTY; @@ -1785,7 +1785,7 @@ weechat_tcl_api_config_new_option (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_new_option"); TCL_RETURN_EMPTY; @@ -1862,7 +1862,7 @@ weechat_tcl_api_config_search_option (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_search_option"); TCL_RETURN_EMPTY; @@ -1899,7 +1899,7 @@ weechat_tcl_api_config_string_to_boolean (ClientData clientData, Tcl_Interp *int /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_string_to_boolean"); TCL_RETURN_INT(0); @@ -1932,7 +1932,7 @@ weechat_tcl_api_config_option_reset (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_reset"); TCL_RETURN_INT(0); @@ -1974,7 +1974,7 @@ weechat_tcl_api_config_option_set (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_set"); TCL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2018,7 +2018,7 @@ weechat_tcl_api_config_option_set_null (ClientData clientData, Tcl_Interp *inter /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_set_null"); TCL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2060,7 +2060,7 @@ weechat_tcl_api_config_option_unset (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_unset"); TCL_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2094,7 +2094,7 @@ weechat_tcl_api_config_option_rename (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_rename"); TCL_RETURN_ERROR; @@ -2129,7 +2129,7 @@ weechat_tcl_api_config_option_is_null (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_is_null"); TCL_RETURN_INT(1); @@ -2162,7 +2162,7 @@ weechat_tcl_api_config_option_default_is_null (ClientData clientData, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_default_is_null"); TCL_RETURN_INT(1); @@ -2193,7 +2193,7 @@ weechat_tcl_api_config_boolean (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_boolean"); TCL_RETURN_INT(0); @@ -2224,7 +2224,7 @@ weechat_tcl_api_config_boolean_default (ClientData clientData, Tcl_Interp *inter /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_boolean_default"); TCL_RETURN_INT(0); @@ -2255,7 +2255,7 @@ weechat_tcl_api_config_integer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_integer"); TCL_RETURN_INT(0); @@ -2286,7 +2286,7 @@ weechat_tcl_api_config_integer_default (ClientData clientData, Tcl_Interp *inter /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_integer_default"); TCL_RETURN_INT(0); @@ -2318,7 +2318,7 @@ weechat_tcl_api_config_string (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_string"); TCL_RETURN_EMPTY; @@ -2350,7 +2350,7 @@ weechat_tcl_api_config_string_default (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_string_default"); TCL_RETURN_EMPTY; @@ -2382,7 +2382,7 @@ weechat_tcl_api_config_color (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_color"); TCL_RETURN_INT(0); @@ -2414,7 +2414,7 @@ weechat_tcl_api_config_color_default (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_color_default"); TCL_RETURN_INT(0); @@ -2446,7 +2446,7 @@ weechat_tcl_api_config_write_option (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_write_option"); TCL_RETURN_ERROR; @@ -2482,7 +2482,7 @@ weechat_tcl_api_config_write_line (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_write_line"); TCL_RETURN_ERROR; @@ -2519,7 +2519,7 @@ weechat_tcl_api_config_write (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_write"); TCL_RETURN_INT(-1); @@ -2551,7 +2551,7 @@ weechat_tcl_api_config_read (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_read"); TCL_RETURN_INT(-1); @@ -2583,7 +2583,7 @@ weechat_tcl_api_config_reload (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_reload"); TCL_RETURN_INT(-1); @@ -2614,7 +2614,7 @@ weechat_tcl_api_config_option_free (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_option_free"); TCL_RETURN_ERROR; @@ -2648,7 +2648,7 @@ weechat_tcl_api_config_section_free_options (ClientData clientData, Tcl_Interp * /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_section_free_options"); TCL_RETURN_ERROR; @@ -2681,7 +2681,7 @@ weechat_tcl_api_config_section_free (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_section_free"); TCL_RETURN_ERROR; @@ -2714,7 +2714,7 @@ weechat_tcl_api_config_free (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_free"); TCL_RETURN_ERROR; @@ -2748,7 +2748,7 @@ weechat_tcl_api_config_get (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_get"); TCL_RETURN_EMPTY; @@ -2780,7 +2780,7 @@ weechat_tcl_api_config_get_plugin (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_get_plugin"); TCL_RETURN_EMPTY; @@ -2814,7 +2814,7 @@ weechat_tcl_api_config_is_set_plugin (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_is_set_plugin"); TCL_RETURN_INT(0); @@ -2850,7 +2850,7 @@ weechat_tcl_api_config_set_plugin (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_set_plugin"); TCL_RETURN_INT(WEECHAT_CONFIG_OPTION_SET_ERROR); @@ -2888,7 +2888,7 @@ weechat_tcl_api_config_unset_plugin (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "config_unset_plugin"); TCL_RETURN_INT(WEECHAT_CONFIG_OPTION_UNSET_ERROR); @@ -2924,7 +2924,7 @@ weechat_tcl_api_prefix (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "prefix"); TCL_RETURN_EMPTY; @@ -2956,7 +2956,7 @@ weechat_tcl_api_color (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "color"); TCL_RETURN_EMPTY; @@ -2988,7 +2988,7 @@ weechat_tcl_api_print (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "print"); TCL_RETURN_ERROR; @@ -3027,7 +3027,7 @@ weechat_tcl_api_print_date_tags (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "print_date_tags"); TCL_RETURN_ERROR; @@ -3074,7 +3074,7 @@ weechat_tcl_api_print_y (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "print_y"); TCL_RETURN_ERROR; @@ -3118,7 +3118,7 @@ weechat_tcl_api_log_print (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "log_print"); TCL_RETURN_ERROR; @@ -3198,7 +3198,7 @@ weechat_tcl_api_hook_command (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_command"); TCL_RETURN_EMPTY; @@ -3289,7 +3289,7 @@ weechat_tcl_api_hook_command_run (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_command_run"); TCL_RETURN_EMPTY; @@ -3371,7 +3371,7 @@ weechat_tcl_api_hook_timer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_timer"); TCL_RETURN_EMPTY; @@ -3459,7 +3459,7 @@ weechat_tcl_api_hook_fd (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_fd"); TCL_RETURN_EMPTY; @@ -3553,7 +3553,7 @@ weechat_tcl_api_hook_process (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_process"); TCL_RETURN_EMPTY; @@ -3647,7 +3647,7 @@ weechat_tcl_api_hook_connect (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_connect"); TCL_RETURN_EMPTY; @@ -3770,7 +3770,7 @@ weechat_tcl_api_hook_print (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_print"); TCL_RETURN_EMPTY; @@ -3882,7 +3882,7 @@ weechat_tcl_api_hook_signal (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_signal"); TCL_RETURN_EMPTY; @@ -3924,7 +3924,7 @@ weechat_tcl_api_hook_signal_send (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_signal_send"); TCL_RETURN_ERROR; @@ -4021,7 +4021,7 @@ weechat_tcl_api_hook_config (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_config"); TCL_RETURN_EMPTY; @@ -4108,7 +4108,7 @@ weechat_tcl_api_hook_completion (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_completion"); TCL_RETURN_EMPTY; @@ -4151,7 +4151,7 @@ weechat_tcl_api_hook_completion_list_add (ClientData clientData, Tcl_Interp *int /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_completion_list_add"); TCL_RETURN_ERROR; @@ -4226,7 +4226,7 @@ weechat_tcl_api_hook_modifier (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_modifier"); TCL_RETURN_EMPTY; @@ -4267,7 +4267,7 @@ weechat_tcl_api_hook_modifier_exec (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_modifier_exec"); TCL_RETURN_EMPTY; @@ -4332,7 +4332,7 @@ weechat_tcl_api_hook_info (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_info"); TCL_RETURN_EMPTY; @@ -4407,7 +4407,7 @@ weechat_tcl_api_hook_info_hashtable (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_info_hashtable"); TCL_RETURN_EMPTY; @@ -4491,7 +4491,7 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_infolist"); TCL_RETURN_EMPTY; @@ -4537,7 +4537,7 @@ weechat_tcl_api_unhook (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "unhook"); TCL_RETURN_ERROR; @@ -4571,7 +4571,7 @@ weechat_tcl_api_unhook_all (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "unhook_all"); TCL_RETURN_ERROR; @@ -4678,7 +4678,7 @@ weechat_tcl_api_buffer_new (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_new"); TCL_RETURN_EMPTY; @@ -4724,7 +4724,7 @@ weechat_tcl_api_buffer_search (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_search"); TCL_RETURN_EMPTY; @@ -4760,7 +4760,7 @@ weechat_tcl_api_buffer_search_main (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_search_main"); TCL_RETURN_EMPTY; @@ -4787,7 +4787,7 @@ weechat_tcl_api_current_buffer (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "current_buffer"); TCL_RETURN_EMPTY; @@ -4812,7 +4812,7 @@ weechat_tcl_api_buffer_clear (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_clear"); TCL_RETURN_ERROR; @@ -4843,7 +4843,7 @@ weechat_tcl_api_buffer_close (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_close"); TCL_RETURN_ERROR; @@ -4876,7 +4876,7 @@ weechat_tcl_api_buffer_merge (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_merge"); TCL_RETURN_ERROR; @@ -4909,7 +4909,7 @@ weechat_tcl_api_buffer_unmerge (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_unmerge"); TCL_RETURN_ERROR; @@ -4949,7 +4949,7 @@ weechat_tcl_api_buffer_get_integer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_get_integer"); TCL_RETURN_INT(-1); @@ -4985,7 +4985,7 @@ weechat_tcl_api_buffer_get_string (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_get_string"); TCL_RETURN_EMPTY; @@ -5020,7 +5020,7 @@ weechat_tcl_api_buffer_get_pointer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_get_pointer"); TCL_RETURN_EMPTY; @@ -5056,7 +5056,7 @@ weechat_tcl_api_buffer_set (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_set"); TCL_RETURN_ERROR; @@ -5093,7 +5093,7 @@ weechat_tcl_api_buffer_string_replace_local_var (ClientData clientData, Tcl_Inte /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "buffer_string_replace_local_var"); TCL_RETURN_ERROR; @@ -5129,7 +5129,7 @@ weechat_tcl_api_current_window (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "current_window"); TCL_RETURN_EMPTY; @@ -5156,7 +5156,7 @@ weechat_tcl_api_window_get_integer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "window_get_integer"); TCL_RETURN_INT(-1); @@ -5192,7 +5192,7 @@ weechat_tcl_api_window_get_string (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "window_get_string"); TCL_RETURN_EMPTY; @@ -5227,7 +5227,7 @@ weechat_tcl_api_window_get_pointer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "window_get_pointer"); TCL_RETURN_EMPTY; @@ -5263,7 +5263,7 @@ weechat_tcl_api_window_set_title (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "window_set_title"); TCL_RETURN_ERROR; @@ -5297,7 +5297,7 @@ weechat_tcl_api_nicklist_add_group (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_add_group"); TCL_RETURN_EMPTY; @@ -5344,7 +5344,7 @@ weechat_tcl_api_nicklist_search_group (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_search_group"); TCL_RETURN_EMPTY; @@ -5382,7 +5382,7 @@ weechat_tcl_api_nicklist_add_nick (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_add_nick"); TCL_RETURN_EMPTY; @@ -5433,7 +5433,7 @@ weechat_tcl_api_nicklist_search_nick (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_search_nick"); TCL_RETURN_EMPTY; @@ -5471,7 +5471,7 @@ weechat_tcl_api_nicklist_remove_group (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_remove_group"); TCL_RETURN_ERROR; @@ -5507,7 +5507,7 @@ weechat_tcl_api_nicklist_remove_nick (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_remove_nick"); TCL_RETURN_ERROR; @@ -5542,7 +5542,7 @@ weechat_tcl_api_nicklist_remove_all (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "nicklist_remove_all"); TCL_RETURN_ERROR; @@ -5574,7 +5574,7 @@ weechat_tcl_api_bar_item_search (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_item_search"); TCL_RETURN_EMPTY; @@ -5642,7 +5642,7 @@ weechat_tcl_api_bar_item_new (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_item_new"); TCL_RETURN_EMPTY; @@ -5682,7 +5682,7 @@ weechat_tcl_api_bar_item_update (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_item_update"); TCL_RETURN_ERROR; @@ -5713,7 +5713,7 @@ weechat_tcl_api_bar_item_remove (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_item_remove"); TCL_RETURN_ERROR; @@ -5747,7 +5747,7 @@ weechat_tcl_api_bar_search (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_search"); TCL_RETURN_EMPTY; @@ -5781,7 +5781,7 @@ weechat_tcl_api_bar_new (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_new"); TCL_RETURN_EMPTY; @@ -5843,7 +5843,7 @@ weechat_tcl_api_bar_set (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_set"); TCL_RETURN_ERROR; @@ -5878,7 +5878,7 @@ weechat_tcl_api_bar_update (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_update"); TCL_RETURN_ERROR; @@ -5909,7 +5909,7 @@ weechat_tcl_api_bar_remove (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "bar_remove"); TCL_RETURN_ERROR; @@ -5941,7 +5941,7 @@ weechat_tcl_api_command (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "command"); TCL_RETURN_ERROR; @@ -5979,7 +5979,7 @@ weechat_tcl_api_info_get (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "info_get"); TCL_RETURN_EMPTY; @@ -6012,7 +6012,7 @@ weechat_tcl_api_info_get_hashtable (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "info_get_hashtable"); TCL_RETURN_EMPTY; @@ -6055,7 +6055,7 @@ weechat_tcl_api_infolist_new (ClientData clientData, Tcl_Interp *interp, (void) objc; (void) objv; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new"); TCL_RETURN_EMPTY; @@ -6081,7 +6081,7 @@ weechat_tcl_api_infolist_new_item (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new_item"); TCL_RETURN_INT(0); @@ -6114,7 +6114,7 @@ weechat_tcl_api_infolist_new_var_integer (ClientData clientData, Tcl_Interp *int /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_integer"); TCL_RETURN_INT(0); @@ -6155,7 +6155,7 @@ weechat_tcl_api_infolist_new_var_string (ClientData clientData, Tcl_Interp *inte /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_string"); TCL_RETURN_INT(0); @@ -6189,7 +6189,7 @@ weechat_tcl_api_infolist_new_var_pointer (ClientData clientData, Tcl_Interp *int /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_pointer"); TCL_RETURN_INT(0); @@ -6223,7 +6223,7 @@ weechat_tcl_api_infolist_new_var_time (ClientData clientData, Tcl_Interp *interp /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_new_var_time"); TCL_RETURN_INT(0); @@ -6263,7 +6263,7 @@ weechat_tcl_api_infolist_get (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_get"); TCL_RETURN_EMPTY; @@ -6300,7 +6300,7 @@ weechat_tcl_api_infolist_next (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_next"); TCL_RETURN_INT(0); @@ -6332,7 +6332,7 @@ weechat_tcl_api_infolist_prev (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_prev"); TCL_RETURN_INT(0); @@ -6365,7 +6365,7 @@ weechat_tcl_api_infolist_reset_item_cursor (ClientData clientData, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); TCL_RETURN_ERROR; @@ -6398,7 +6398,7 @@ weechat_tcl_api_infolist_fields (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_fields"); TCL_RETURN_EMPTY; @@ -6431,7 +6431,7 @@ weechat_tcl_api_infolist_integer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_integer"); TCL_RETURN_INT(0); @@ -6467,7 +6467,7 @@ weechat_tcl_api_infolist_string (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_string"); TCL_RETURN_EMPTY; @@ -6503,7 +6503,7 @@ weechat_tcl_api_infolist_pointer (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_pointer"); TCL_RETURN_EMPTY; @@ -6539,7 +6539,7 @@ weechat_tcl_api_infolist_time (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_time"); TCL_RETURN_EMPTY; @@ -6575,7 +6575,7 @@ weechat_tcl_api_infolist_free (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "infolist_free"); TCL_RETURN_ERROR; @@ -6607,7 +6607,7 @@ weechat_tcl_api_upgrade_new (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "upgrade_new"); TCL_RETURN_EMPTY; @@ -6647,7 +6647,7 @@ weechat_tcl_api_upgrade_write_object (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "upgrade_write_object"); TCL_RETURN_INT(0); @@ -6739,7 +6739,7 @@ weechat_tcl_api_upgrade_read (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "upgrade_read"); TCL_RETURN_EMPTY; @@ -6780,7 +6780,7 @@ weechat_tcl_api_upgrade_close (ClientData clientData, Tcl_Interp *interp, /* make C compiler happy */ (void) clientData; - if (!tcl_current_script) + if (!tcl_current_script || !tcl_current_script->name) { WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "upgrade_close"); TCL_RETURN_ERROR;