diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-05 12:23:06 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-05 12:23:06 +0100 |
commit | fe16ce99153558d44c51a4d2648c1125417771bd (patch) | |
tree | b02e416279c839232887a6ccf34e11fe7493834f | |
parent | d32b22f76f9d677780780ec3ab1a497f0ad7a9d5 (diff) | |
download | weechat-fe16ce99153558d44c51a4d2648c1125417771bd.zip |
Add debug messages for hooks when core debug >= 2
-rw-r--r-- | src/core/wee-hook.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 3f660b20e..bbb37c52c 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -236,6 +236,14 @@ hook_init_data (struct t_hook *hook, struct t_weechat_plugin *plugin, hook->running = 0; hook->callback_data = callback_data; hook->hook_data = NULL; + + if (weechat_debug_core >= 2) + { + gui_chat_printf (NULL, + "debug: adding hook: type=%d (%s), plugin=%lx (%s)", + hook->type, hook_type_string[hook->type], + hook->plugin, plugin_get_name (hook->plugin)); + } } /* @@ -1606,6 +1614,14 @@ unhook (struct t_hook *hook) /* hook already deleted? */ if (hook->deleted) return; + + if (weechat_debug_core >= 2) + { + gui_chat_printf (NULL, + "debug: removing hook: type=%d (%s), plugin=%lx (%s)", + hook->type, hook_type_string[hook->type], + hook->plugin, plugin_get_name (hook->plugin)); + } /* free data */ if (hook->hook_data) |