From fe4f28f593231f93fe4a2e6365edd45c301a6596 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 17 Jul 2010 17:11:09 +0100 Subject: Remove the user from default_channel if it has the auto_join setting disabled. --- root_commands.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index e9b0e0ab..3ce26924 100644 --- a/root_commands.c +++ b/root_commands.c @@ -163,6 +163,10 @@ static void cmd_identify( irc_t *irc, char **cmd ) if( load ) { irc_channel_auto_joins( irc, NULL ); + if( !set_getbool( &irc->default_channel->set, "auto_join" ) ) + irc_channel_del_user( irc->default_channel, irc->user, + IRC_CDU_PART, "auto_join disabled " + "for this channel." ); if( set_getbool( &irc->b->set, "auto_connect" ) ) irc->login_source_id = b_timeout_add( 200, cmd_identify_finish, irc ); -- cgit v1.2.3