Changeset 62d2cfb for protocols/twitter/twitter.c
- Timestamp:
- 2010-03-25T21:31:27Z (14 years ago)
- Branches:
- master
- Children:
- 2abceca
- Parents:
- b4dd253
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
rb4dd253 r62d2cfb 29 29 30 30 /** 31 * *Main loop function32 * */31 * Main loop function 32 */ 33 33 gboolean twitter_main_loop(gpointer data, gint fd, b_input_condition cond) 34 34 { … … 38 38 return 0; 39 39 40 // If the user uses multiple private message windows we need to get the 41 // users buddies. 42 if (!set_getbool( &ic->acc->set, "use_groupchat" )) 43 twitter_get_statuses_friends(ic, -1); 44 40 45 // Do stuff.. 41 46 twitter_get_home_timeline(ic, -1); … … 48 53 static void twitter_init( account_t *acc ) 49 54 { 55 set_t *s; 56 s = set_add( &acc->set, "use_groupchat", "false", set_eval_bool, acc ); 50 57 } 51 58 … … 58 65 struct im_connection *ic = imcb_new( acc ); 59 66 struct twitter_data *td = g_new0( struct twitter_data, 1 ); 60 67 61 68 td->user = acc->user; 62 69 td->pass = acc->pass; … … 68 75 ic->flags = OPT_LOGGED_IN; 69 76 70 // Try to get the buddies...71 //twitter_get_friends_ids(ic, -1);72 73 //twitter_get_home_timeline(ic, -1);74 75 77 // Run this once. After this queue the main loop function. 76 78 twitter_main_loop(ic, -1, 0); … … 81 83 imcb_log( ic, "Connecting to twitter" ); 82 84 imcb_connected(ic); 85 86 twitter_connections = g_slist_append( twitter_connections, ic ); 83 87 } 84 88 … … 97 101 g_free( td ); 98 102 } 103 104 twitter_connections = g_slist_remove( twitter_connections, ic ); 99 105 } 100 106 … … 104 110 static int twitter_buddy_msg( struct im_connection *ic, char *who, char *message, int away ) 105 111 { 106 imcb_log( ic, "In twitter_buddy_msg..."); 107 twitter_post_status(ic, message); 112 // Let's just update the status. 113 // if ( g_strcasecmp(who, ic->acc->user) == 0 ) 114 twitter_post_status(ic, message); 115 // else 116 // twitter_direct_messages_new(ic, who, message); 108 117 return( 0 ); 109 118 } … … 124 133 static void twitter_set_my_name( struct im_connection *ic, char *info ) 125 134 { 126 imcb_log( ic, "In twitter_set_my_name..." );127 // char * aap = twitter_http("http://gertje.org", NULL, ic, 1, "geert", "poep", NULL, 0);128 129 // imcb_log( ic, aap );130 // g_free(aap);131 135 } 132 136 … … 218 222 219 223 register_protocol(ret); 220 } 221 224 225 // Initialise the twitter_connections GSList. 226 twitter_connections = NULL; 227 } 228
Note: See TracChangeset
for help on using the changeset viewer.