From 1014caba0ae2c737e35b8f51cafe77c1967e6b67 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 7 Apr 2010 01:46:38 +0100 Subject: In groupchat mode, make contacts show up in the room instead of in &bitlbee. And clean up the room when disabling the Twitter account. --- protocols/twitter/twitter.c | 2 ++ protocols/twitter/twitter_lib.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index d4e2ce3e..f62aeada 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -100,6 +100,8 @@ static void twitter_logout( struct im_connection *ic ) // Remove the main_loop function from the function queue. b_event_remove(td->main_loop_id); + imcb_chat_free(td->home_timeline_gc); + if( td ) { g_free( td ); diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 50f614a7..3bcb59ca 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -97,12 +97,17 @@ static void txl_free(struct twitter_xml_list *txl) */ static void twitter_add_buddy(struct im_connection *ic, char *name) { + struct twitter_data *td = ic->proto_data; + // Check if the buddy is allready in the buddy list. if (!imcb_find_buddy( ic, name )) { // The buddy is not in the list, add the buddy and set the status to logged in. imcb_add_buddy( ic, name, NULL ); - imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL ); + if (set_getbool( &ic->acc->set, "use_groupchat" )) + imcb_chat_add_buddy( td->home_timeline_gc, name ); + else + imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL ); } } -- cgit v1.2.3