diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-16 14:16:03 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-16 14:16:03 +0000 |
commit | d5b58ff068c601906c83524b91b7d5aea666faa0 (patch) | |
tree | 6d9f81116be9b339ba3a2e695c4bb67f374da70d /src/plugins/scripts/python | |
parent | 6eabc3aa61c7f0d6be44c2d9e88a8611ff0cc9f3 (diff) | |
download | weechat-d5b58ff068c601906c83524b91b7d5aea666faa0.zip |
Added completion system for plugins/scripts commands, fixed plugins autoload
Diffstat (limited to 'src/plugins/scripts/python')
-rw-r--r-- | src/plugins/scripts/python/weechat-python.c | 9 |
1 files changed, 7 insertions, 2 deletions
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"); |