mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
Allow script functions "prefix" and "color" when script is not yet registered with "register"
This commit is contained in:
@@ -3110,12 +3110,6 @@ weechat_ruby_api_prefix (VALUE class, VALUE prefix)
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "prefix");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
c_prefix = NULL;
|
||||
|
||||
if (NIL_P (prefix))
|
||||
@@ -3146,12 +3140,6 @@ weechat_ruby_api_color (VALUE class, VALUE color)
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
|
||||
if (!ruby_current_script || !ruby_current_script->name)
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "color");
|
||||
RUBY_RETURN_EMPTY;
|
||||
}
|
||||
|
||||
c_color = NULL;
|
||||
|
||||
if (NIL_P (color))
|
||||
|
||||
Reference in New Issue
Block a user