summaryrefslogtreecommitdiff
path: root/src/core/hook/wee-hook-hsignal.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-04-24 10:00:09 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-04-24 10:06:54 +0200
commitd16640130e65ed4af76d285a4339a0c200ee41b0 (patch)
tree1c78302f9726ac301af1f91e755ee863f6dcb17d /src/core/hook/wee-hook-hsignal.c
parent95cf2aa9565233e73c356c7f3c83ea9815fa4dbc (diff)
downloadweechat-d16640130e65ed4af76d285a4339a0c200ee41b0.zip
core: add functions to get short description of hooks
Diffstat (limited to 'src/core/hook/wee-hook-hsignal.c')
-rw-r--r--src/core/hook/wee-hook-hsignal.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hook/wee-hook-hsignal.c b/src/core/hook/wee-hook-hsignal.c
index 451d108e5..82198c3c0 100644
--- a/src/core/hook/wee-hook-hsignal.c
+++ b/src/core/hook/wee-hook-hsignal.c
@@ -35,6 +35,18 @@
/*
+ * Returns description of hook.
+ *
+ * Note: result must be freed after use.
+ */
+
+char *
+hook_hsignal_get_description (struct t_hook *hook)
+{
+ return strdup (HOOK_HSIGNAL(hook, signal));
+}
+
+/*
* Hooks a hsignal (signal with hashtable).
*
* Returns pointer to new hook, NULL if error.