From 03091413eeb0935adfad1bee7b02a0161f403835 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 31 Aug 2000 21:03:40 +0000 Subject: [PATCH] Automatic joining to channels didn't work git-svn-id: http://svn.irssi.org/repos/irssi/trunk@639 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-channels-setup.c | 6 ++---- src/irc/core/irc-core.c | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/irc/core/irc-channels-setup.c b/src/irc/core/irc-channels-setup.c index 52949783..51d8a991 100644 --- a/src/irc/core/irc-channels-setup.c +++ b/src/irc/core/irc-channels-setup.c @@ -38,9 +38,7 @@ static void event_connected(IRC_SERVER_REC *server) GString *chans; GSList *tmp; - g_return_if_fail(server != NULL); - - if (server->connrec->reconnection) + if (!IS_IRC_SERVER(server) || server->connrec->reconnection) return; /* join to the channels marked with autojoin in setup */ @@ -71,7 +69,7 @@ static void channel_wholist(CHANNEL_REC *channel) NICK_REC *nick; char **bots, **bot; - g_return_if_fail(channel != NULL); + g_return_if_fail(IS_CHANNEL(channel)); rec = channels_setup_find(channel->name, channel->server->connrec->chatnet); if (rec == NULL || rec->autosendcmd == NULL || !*rec->autosendcmd) diff --git a/src/irc/core/irc-core.c b/src/irc/core/irc-core.c index 932ede83..afdc00c2 100644 --- a/src/irc/core/irc-core.c +++ b/src/irc/core/irc-core.c @@ -44,6 +44,9 @@ 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) { irc_servers_init(); @@ -51,6 +54,7 @@ void irc_core_init(void) irc_queries_init(); ctcp_init(); + irc_channels_setup_init(); irc_commands_init(); irc_irc_init(); lag_init(); @@ -70,6 +74,7 @@ void irc_core_deinit(void) netsplit_deinit(); lag_deinit(); irc_commands_deinit(); + irc_channels_setup_deinit(); ctcp_deinit(); irc_queries_deinit();