summaryrefslogtreecommitdiff
path: root/src/plugins/python
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-11 09:12:04 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-01-11 09:12:04 +0100
commit48837c35bc24cbab1bd518e260b0173d0ae787e1 (patch)
tree86bb90cf5ff895e1083562d88d4a90d8ee556f2f /src/plugins/python
parente5b0b827ef230044eb039c9ce58f41515b03f0e0 (diff)
downloadweechat-48837c35bc24cbab1bd518e260b0173d0ae787e1.zip
api: add stdin options in functions hook_process_hashtable and hook_set (task #10847, task #13031)
The function hook_set has been added in script API.
Diffstat (limited to 'src/plugins/python')
-rw-r--r--src/plugins/python/weechat-python-api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c
index 4b6128edd..3a3cc7b68 100644
--- a/src/plugins/python/weechat-python-api.c
+++ b/src/plugins/python/weechat-python-api.c
@@ -3159,6 +3159,25 @@ weechat_python_api_hook_focus (PyObject *self, PyObject *args)
}
static PyObject *
+weechat_python_api_hook_set (PyObject *self, PyObject *args)
+{
+ char *hook, *property, *value;
+
+ API_FUNC(1, "hook_set", API_RETURN_ERROR);
+ hook = NULL;
+ property = NULL;
+ value = NULL;
+ if (!PyArg_ParseTuple (args, "sss", &hook, &property, &value))
+ API_WRONG_ARGS(API_RETURN_ERROR);
+
+ weechat_hook_set (API_STR2PTR(hook),
+ property,
+ value);
+
+ API_RETURN_OK;
+}
+
+static PyObject *
weechat_python_api_unhook (PyObject *self, PyObject *args)
{
char *hook;
@@ -5122,6 +5141,7 @@ PyMethodDef weechat_python_funcs[] =
API_DEF_FUNC(hook_info_hashtable),
API_DEF_FUNC(hook_infolist),
API_DEF_FUNC(hook_focus),
+ API_DEF_FUNC(hook_set),
API_DEF_FUNC(unhook),
API_DEF_FUNC(unhook_all),
API_DEF_FUNC(buffer_new),