aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc_user.c6
-rw-r--r--protocols/twitter/twitter.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/irc_user.c b/irc_user.c
index 8b290bbf..bf08c755 100644
--- a/irc_user.c
+++ b/irc_user.c
@@ -210,7 +210,11 @@ void irc_user_quit( irc_user_t *iu, const char *msg )
return;
for( l = iu->irc->channels; l; l = l->next )
- send_quit |= irc_channel_del_user( (irc_channel_t*) l->data, iu, IRC_CDU_SILENT, NULL );
+ {
+ irc_channel_t *ic = l->data;
+ send_quit |= irc_channel_del_user( ic, iu, IRC_CDU_SILENT, NULL ) &&
+ ( ic->flags & IRC_CHANNEL_JOINED );
+ }
if( send_quit )
irc_send_quit( iu, msg );
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index a2f2325c..d5b71bc3 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -256,7 +256,7 @@ static void twitter_logout( struct im_connection *ic )
struct twitter_data *td = ic->proto_data;
// Set the status to logged out.
- ic->flags = 0;
+ ic->flags &= ~ OPT_LOGGED_IN;
// Remove the main_loop function from the function queue.
b_event_remove(td->main_loop_id);