From 7b4af2b243a7bf582fcd05104ed41a1a03422772 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 8 Dec 2007 00:34:17 +0100 Subject: Added config_reload event for IRC plugin --- src/core/wee-config-file.c | 24 +++++++++++++++--------- src/core/weechat.c | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 8568fcd71..55dfddefb 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -827,10 +827,13 @@ config_file_reload (struct t_config_file *config_file) for (ptr_section = config_file->sections; ptr_section; ptr_section = ptr_section->next_section) { - for (ptr_option = ptr_section->options; ptr_option; - ptr_option = ptr_option->next_option) + if (!ptr_section->callback_read) { - ptr_option->loaded = 0; + for (ptr_option = ptr_section->options; ptr_option; + ptr_option = ptr_option->next_option) + { + ptr_option->loaded = 0; + } } } @@ -841,15 +844,18 @@ config_file_reload (struct t_config_file *config_file) for (ptr_section = config_file->sections; ptr_section; ptr_section = ptr_section->next_section) { - for (ptr_option = ptr_section->options; ptr_option; - ptr_option = ptr_option->next_option) + if (!ptr_section->callback_read) { - if (!ptr_option->loaded) + for (ptr_option = ptr_section->options; ptr_option; + ptr_option = ptr_option->next_option) { - if (config_file_option_reset (ptr_option) == 2) + if (!ptr_option->loaded) { - if (ptr_option->callback_change) - (void) (ptr_option->callback_change) (); + if (config_file_option_reset (ptr_option) == 2) + { + if (ptr_option->callback_change) + (void) (ptr_option->callback_change) (); + } } } } diff --git a/src/core/weechat.c b/src/core/weechat.c index 8e8eca7de..3e4c8bd13 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -327,7 +327,7 @@ weechat_parse_args (int argc, char *argv[]) _("Warning: unable to create server " "('%s'), ignored\n"), argv[i]); - irc_server_destroy (&server_tmp); + irc_server_free_data (&server_tmp); server_cmd_line = 1; } }*/ -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0