From 015a598fa32e40c68dd87241b72e8933ec404c29 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 14 Oct 2000 01:43:05 +0000 Subject: [PATCH] [irc_]channels_setup_[de]init() calls were in wrong places. Reconnection forgot to join to old channels after the first reconnection try. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@744 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/channels.c | 6 +++++- src/core/servers-reconnect.c | 1 + src/irc/core/irc-channels.c | 7 +++++-- src/irc/core/irc-core.c | 5 ----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/core/channels.c b/src/core/channels.c index c21758af..583280af 100644 --- a/src/core/channels.c +++ b/src/core/channels.c @@ -155,7 +155,7 @@ static void event_connected(SERVER_REC *server) static int match_nick_flags(SERVER_REC *server, NICK_REC *nick, char flag) { - char *flags = server->get_nick_flags(); + const char *flags = server->get_nick_flags(); return (flag == flags[0] && nick->op) || (flag == flags[1] && (nick->voice || nick->halfop || @@ -203,11 +203,15 @@ void channel_send_autocommands(CHANNEL_REC *channel) void channels_init(void) { + channels_setup_init(); + signal_add("event connected", (SIGNAL_FUNC) event_connected); } void channels_deinit(void) { + channels_setup_deinit(); + signal_remove("event connected", (SIGNAL_FUNC) event_connected); module_uniq_destroy("CHANNEL"); } diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index 00b3f132..54de8d38 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -115,6 +115,7 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src) g_return_val_if_fail(dest != NULL, NULL); dest->type = module_get_uniq_id("SERVER CONNECT", 0); + dest->reconnection = src->reconnection; dest->proxy = g_strdup(src->proxy); dest->proxy_port = src->proxy_port; dest->proxy_string = g_strdup(src->proxy_string); diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c index 7daba896..f759216c 100644 --- a/src/irc/core/irc-channels.c +++ b/src/irc/core/irc-channels.c @@ -38,6 +38,9 @@ void channels_query_deinit(void); void channel_events_init(void); void channel_events_deinit(void); +void irc_channels_setup_init(void); +void irc_channels_setup_deinit(void); + void massjoin_init(void); void massjoin_deinit(void); @@ -202,7 +205,7 @@ void irc_channels_init(void) channel_events_init(); channel_rejoin_init(); /* after channel_events_init() */ channels_query_init(); - channels_setup_init(); + irc_channels_setup_init(); bans_init(); modes_init(); @@ -220,7 +223,7 @@ void irc_channels_deinit(void) channel_events_deinit(); channel_rejoin_deinit(); channels_query_deinit(); - channels_setup_deinit(); + irc_channels_setup_deinit(); bans_deinit(); modes_deinit(); diff --git a/src/irc/core/irc-core.c b/src/irc/core/irc-core.c index 7eb70bb1..b84c89fd 100644 --- a/src/irc/core/irc-core.c +++ b/src/irc/core/irc-core.c @@ -45,9 +45,6 @@ void irc_log_deinit(void); void lag_init(void); void lag_deinit(void); -void irc_channels_setup_init(void); -void irc_channels_setup_deinit(void); - void irc_core_init(void) { CHAT_PROTOCOL_REC *rec; @@ -65,7 +62,6 @@ void irc_core_init(void) irc_queries_init(); ctcp_init(); - irc_channels_setup_init(); irc_commands_init(); irc_irc_init(); lag_init(); @@ -83,7 +79,6 @@ void irc_core_deinit(void) netsplit_deinit(); lag_deinit(); irc_commands_deinit(); - irc_channels_setup_deinit(); ctcp_deinit(); irc_queries_deinit();