aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-17 17:11:09 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-17 17:11:09 +0100
commitfe4f28f593231f93fe4a2e6365edd45c301a6596 (patch)
treef359ef05b719ae88ace7f14bdab03de88a8be137
parent5c18a7632da2507ee9f8e63fafa46061163e3e3c (diff)
Remove the user from default_channel if it has the auto_join setting
disabled.
-rw-r--r--root_commands.c4
1 files changed, 4 insertions, 0 deletions
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 );