Changeset 2abceca for protocols/twitter/twitter.c
- Timestamp:
- 2010-04-06T17:25:51Z (14 years ago)
- Branches:
- master
- Children:
- 0519b0a
- Parents:
- 62d2cfb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
r62d2cfb r2abceca 35 35 struct im_connection *ic = data; 36 36 // Check if we are still logged in... 37 if ((ic->flags & OPT_LOGGED_IN) != OPT_LOGGED_IN) 37 // We are logged in if the flag says so and the connection is still in the connections list. 38 if ((ic->flags & OPT_LOGGED_IN) != OPT_LOGGED_IN 39 && !g_slist_find( twitter_connections, ic )) 38 40 return 0; 39 41 … … 55 57 set_t *s; 56 58 s = set_add( &acc->set, "use_groupchat", "false", set_eval_bool, acc ); 59 s->flags |= ACC_SET_OFFLINE_ONLY; 57 60 } 58 61 … … 72 75 ic->proto_data = td; 73 76 74 // Set the status to logged in.75 i c->flags = OPT_LOGGED_IN;77 imcb_log( ic, "Connecting to twitter" ); 78 imcb_connected(ic); 76 79 77 80 // Run this once. After this queue the main loop function. … … 79 82 80 83 // Queue the main_loop 81 b_timeout_add(60000, twitter_main_loop, ic); 82 83 imcb_log( ic, "Connecting to twitter" ); 84 imcb_connected(ic); 84 // Save the return value, so we can remove the timeout on logout. 85 td->main_loop_id = b_timeout_add(60000, twitter_main_loop, ic); 85 86 86 87 twitter_connections = g_slist_append( twitter_connections, ic ); … … 96 97 // Set the status to logged out. 97 98 ic->flags = 0; 99 100 // Remove the main_loop function from the function queue. 101 b_event_remove(td->main_loop_id); 98 102 99 103 if( td ) … … 149 153 static void twitter_chat_msg( struct groupchat *c, char *message, int flags ) 150 154 { 155 if( c && message ) 156 twitter_post_status(c->ic, message); 151 157 } 152 158
Note: See TracChangeset
for help on using the changeset viewer.