diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-08-08 11:38:27 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-08-08 11:38:27 +0200 |
commit | 46bc18193397a8a3d5b756f1ffeda8c5f725d9b4 (patch) | |
tree | 8c934b370b6a1743d9e1d24cf6ddf5d9a3d0437e /src/plugins/guile | |
parent | 068d0df56b299d0cc023309c1a6c3cd3fee30bde (diff) | |
download | weechat-46bc18193397a8a3d5b756f1ffeda8c5f725d9b4.zip |
scripts: add signals for scripts loaded/unloaded/installed/removed
Diffstat (limited to 'src/plugins/guile')
-rw-r--r-- | src/plugins/guile/weechat-guile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index 071c5252c..93d84a24c 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -412,6 +412,9 @@ weechat_guile_load (const char *filename) &weechat_guile_api_buffer_input_data_cb, &weechat_guile_api_buffer_close_cb); + weechat_hook_signal_send ("guile_script_loaded", WEECHAT_HOOK_SIGNAL_STRING, + guile_current_script->filename); + return 1; } @@ -437,6 +440,7 @@ weechat_guile_unload (struct t_plugin_script *script) { int *rc; void *interpreter; + char *filename; if ((weechat_guile_plugin->debug >= 2) || !guile_quiet) { @@ -453,6 +457,7 @@ weechat_guile_unload (struct t_plugin_script *script) free (rc); } + filename = strdup (script->filename); interpreter = script->interpreter; if (guile_current_script == script) @@ -464,6 +469,11 @@ weechat_guile_unload (struct t_plugin_script *script) if (interpreter) weechat_guile_catch (scm_gc_unprotect_object, interpreter); + + weechat_hook_signal_send ("guile_script_unloaded", + WEECHAT_HOOK_SIGNAL_STRING, filename); + if (filename) + free (filename); } /* |