From d5b58ff068c601906c83524b91b7d5aea666faa0 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 16 Dec 2005 14:16:03 +0000 Subject: Added completion system for plugins/scripts commands, fixed plugins autoload --- src/plugins/scripts/python/weechat-python.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugins/scripts/python') diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 00728bba5..bbe74ef8e 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -333,6 +333,7 @@ static PyObject * weechat_python_add_command_handler (PyObject *self, PyObject *args) { char *command, *function, *description, *arguments, *arguments_description; + char *completion_template; /* make gcc happy */ (void) self; @@ -350,9 +351,11 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args) description = NULL; arguments = NULL; arguments_description = NULL; + completion_template = NULL; - if (!PyArg_ParseTuple (args, "ss|sss", &command, &function, - &description, &arguments, &arguments_description)) + if (!PyArg_ParseTuple (args, "ss|ssss", &command, &function, + &description, &arguments, &arguments_description, + completion_template)) { python_plugin->printf_server (python_plugin, "Python error: wrong parameters for " @@ -365,6 +368,7 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args) description, arguments, arguments_description, + completion_template, weechat_python_handler, function, (void *)python_current_script)) @@ -1151,6 +1155,7 @@ weechat_plugin_init (t_weechat_plugin *plugin) "[load filename] | [autoload] | [reload] | [unload]", "filename: Python script (file) to load\n\n" "Without argument, /python command lists all loaded Python scripts.", + "load|autoload|reload|unload", weechat_python_cmd, NULL, NULL); plugin->mkdir_home (plugin, "python"); -- cgit v1.2.3