1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

Added config file functions in plugins API, improved /reload and /save commands (now possible to reload/save some files only), fixed completion bug

This commit is contained in:
Sebastien Helleu
2008-01-27 10:48:29 +01:00
parent ed26a0389c
commit ad41486543
30 changed files with 4687 additions and 4118 deletions
+20 -1
View File
@@ -411,8 +411,27 @@ script_remove (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script **scripts,
struct t_plugin_script *script)
{
struct t_script_callback *ptr_script_callback;
for (ptr_script_callback = script->callbacks; ptr_script_callback;
ptr_script_callback = ptr_script_callback->next_callback)
{
if (ptr_script_callback->hook)
{
weechat_unhook (ptr_script_callback->hook);
}
if (ptr_script_callback->config_file
&& !ptr_script_callback->config_section
&& !ptr_script_callback->config_option)
{
if (weechat_config_boolean (weechat_config_get_weechat ("plugins_save_config_on_unload")))
weechat_config_write (ptr_script_callback->config_file);
weechat_config_free (ptr_script_callback->config_file);
}
}
/* remove all callbacks created by this script */
script_callback_remove_all (weechat_plugin, script);
script_callback_remove_all (script);
/* free data */
if (script->filename)