1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 21:06: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
@@ -2702,12 +2702,6 @@ weechat_python_api_prefix (PyObject *self, PyObject *args)
/* make C compiler happy */
(void) self;
if (!python_current_script || !python_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "prefix");
PYTHON_RETURN_EMPTY;
}
prefix = NULL;
if (!PyArg_ParseTuple (args, "s", &prefix))
@@ -2734,12 +2728,6 @@ weechat_python_api_color (PyObject *self, PyObject *args)
/* make C compiler happy */
(void) self;
if (!python_current_script || !python_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "color");
PYTHON_RETURN_EMPTY;
}
color = NULL;
if (!PyArg_ParseTuple (args, "s", &color))