mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
load config on chat protocol cre
This commit is contained in:
parent
bee057ff21
commit
3760fcd1ca
@ -227,8 +227,7 @@ void channels_setup_init(void)
|
||||
setupchannels = NULL;
|
||||
source_host_ok = FALSE;
|
||||
|
||||
signal_add("setup reread", (SIGNAL_FUNC) channels_read_config);
|
||||
signal_add("irssi init read settings", (SIGNAL_FUNC) channels_read_config);
|
||||
signal_add("setup reread channels", (SIGNAL_FUNC) channels_read_config);
|
||||
}
|
||||
|
||||
void channels_setup_deinit(void)
|
||||
@ -236,6 +235,5 @@ void channels_setup_deinit(void)
|
||||
while (setupchannels != NULL)
|
||||
channel_setup_destroy(setupchannels->data);
|
||||
|
||||
signal_remove("setup reread", (SIGNAL_FUNC) channels_read_config);
|
||||
signal_remove("irssi init read settings", (SIGNAL_FUNC) channels_read_config);
|
||||
signal_remove("setup reread channels", (SIGNAL_FUNC) channels_read_config);
|
||||
}
|
||||
|
@ -211,8 +211,7 @@ void chatnets_init(void)
|
||||
chatnets = NULL;
|
||||
|
||||
signal_add_first("event connected", (SIGNAL_FUNC) sig_connected);
|
||||
signal_add("setup reread", (SIGNAL_FUNC) read_chatnets);
|
||||
signal_add_first("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
|
||||
signal_add("setup reread chatnets", (SIGNAL_FUNC) read_chatnets);
|
||||
}
|
||||
|
||||
void chatnets_deinit(void)
|
||||
@ -220,6 +219,5 @@ void chatnets_deinit(void)
|
||||
module_uniq_destroy("CHATNET");
|
||||
|
||||
signal_remove("event connected", (SIGNAL_FUNC) sig_connected);
|
||||
signal_remove("setup reread", (SIGNAL_FUNC) read_chatnets);
|
||||
signal_remove("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
|
||||
signal_remove("setup reread chatnets", (SIGNAL_FUNC) read_chatnets);
|
||||
}
|
||||
|
@ -223,6 +223,13 @@ static void sig_irssi_init_finished(void)
|
||||
irssi_init_finished = TRUE;
|
||||
}
|
||||
|
||||
static void reread_setup(void)
|
||||
{
|
||||
signal_emit("setup reread chatnets", 0);
|
||||
signal_emit("setup reread servers", 0);
|
||||
signal_emit("setup reread channels", 0);
|
||||
}
|
||||
|
||||
void core_init(void)
|
||||
{
|
||||
dialog_type_queue = NULL;
|
||||
@ -276,6 +283,9 @@ void core_init(void)
|
||||
#endif
|
||||
read_settings();
|
||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
signal_add("setup reread", (SIGNAL_FUNC) reread_setup);
|
||||
signal_add("irssi init read settings", (SIGNAL_FUNC) reread_setup);
|
||||
signal_add_last("chat protocol created", (SIGNAL_FUNC) reread_setup);
|
||||
signal_add("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);
|
||||
|
||||
settings_check();
|
||||
@ -288,6 +298,9 @@ void core_deinit(void)
|
||||
module_uniq_destroy("WINDOW ITEM TYPE");
|
||||
|
||||
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
signal_remove("setup reread", (SIGNAL_FUNC) reread_setup);
|
||||
signal_remove("irssi init read settings", (SIGNAL_FUNC) reread_setup);
|
||||
signal_remove("chat protocol created", (SIGNAL_FUNC) reread_setup);
|
||||
signal_remove("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);
|
||||
|
||||
wcwidth_wrapper_deinit();
|
||||
|
@ -765,8 +765,7 @@ void servers_setup_init(void)
|
||||
read_settings();
|
||||
|
||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
signal_add("setup reread", (SIGNAL_FUNC) read_servers);
|
||||
signal_add("irssi init read settings", (SIGNAL_FUNC) read_servers);
|
||||
signal_add("setup reread servers", (SIGNAL_FUNC) read_servers);
|
||||
}
|
||||
|
||||
void servers_setup_deinit(void)
|
||||
@ -779,8 +778,7 @@ void servers_setup_deinit(void)
|
||||
server_setup_destroy(setupservers->data);
|
||||
|
||||
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
||||
signal_remove("setup reread", (SIGNAL_FUNC) read_servers);
|
||||
signal_remove("irssi init read settings", (SIGNAL_FUNC) read_servers);
|
||||
signal_remove("setup reread servers", (SIGNAL_FUNC) read_servers);
|
||||
|
||||
module_uniq_destroy("SERVER SETUP");
|
||||
}
|
||||
|
@ -106,9 +106,6 @@ void irc_core_init(void)
|
||||
(QUERY_REC *(*) (const char *, const char *, int))
|
||||
irc_query_create;
|
||||
|
||||
chat_protocol_register(rec);
|
||||
g_free(rec);
|
||||
|
||||
irc_session_init();
|
||||
irc_chatnets_init();
|
||||
irc_servers_init();
|
||||
@ -125,6 +122,10 @@ void irc_core_init(void)
|
||||
sasl_init();
|
||||
|
||||
settings_check();
|
||||
|
||||
chat_protocol_register(rec);
|
||||
g_free(rec);
|
||||
|
||||
module_register("irc", "core");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user