Ignore:
Timestamp:
2010-06-24T09:14:34Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
41d415b
Parents:
7cd2e8a (diff), 38ff846 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging a few revisions from mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r7cd2e8a r8b8def58  
    4040                return 0;
    4141
    42         // If the user uses multiple private message windows we need to get the
    43         // users buddies.
    44         if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "many") == 0)
    45                 twitter_get_statuses_friends(ic, -1);
    46 
    4742        // Do stuff..
    4843        twitter_get_home_timeline(ic, -1);
     
    5651        struct twitter_data *td = ic->proto_data;
    5752       
    58         imcb_log( ic, "Connecting to Twitter" );
     53        imcb_log( ic, "Getting initial statuses" );
    5954
    6055        // Run this once. After this queue the main loop function.
     
    6661}
    6762
     63static void twitter_oauth_start( struct im_connection *ic );
     64
     65void twitter_login_finish( struct im_connection *ic )
     66{
     67        struct twitter_data *td = ic->proto_data;
     68       
     69        if( set_getbool( &ic->acc->set, "oauth" ) && !td->oauth_info )
     70                twitter_oauth_start( ic );
     71        else if( g_strcasecmp( set_getstr( &ic->acc->set, "mode" ), "one" ) != 0 &&
     72                 !( td->flags & TWITTER_HAVE_FRIENDS ) )
     73        {
     74                imcb_log( ic, "Getting contact list" );
     75                twitter_get_statuses_friends( ic, -1 );
     76        }
     77        else
     78                twitter_main_loop_start( ic );
     79}
    6880
    6981static const struct oauth_service twitter_oauth =
     
    128140                ic->acc->pass = oauth_to_string( info );
    129141               
    130                 twitter_main_loop_start( ic );
     142                twitter_login_finish( ic );
    131143        }
    132144       
     
    211223        imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL );
    212224       
    213         if( td->oauth_info || !set_getbool( &acc->set, "oauth" ) )
    214                 twitter_main_loop_start( ic );
    215         else
    216                 twitter_oauth_start( ic );
     225        imcb_log( ic, "Connecting" );
     226       
     227        twitter_login_finish( ic );
    217228}
    218229
Note: See TracChangeset for help on using the changeset viewer.