1
0
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:
Sebastien Helleu
2010-10-10 10:04:37 +02:00
parent 85f6444fef
commit e2f58820fe
5 changed files with 1 additions and 67 deletions
@@ -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))