aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-07 01:27:51 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-07 01:27:51 +0100
commitd5690197326bad1090dbb9f6bfc95470b479fe6b (patch)
tree06a3f320463b51b7b35c9dfbe705ced9c4faa53a /protocols/twitter/twitter.c
parent0519b0a42b5e0ed09f796a92aa7bd3b7d3f06b9d (diff)
A little more cleanup.
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r--protocols/twitter/twitter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index fb7acc12..d4e2ce3e 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -35,8 +35,8 @@ gboolean twitter_main_loop(gpointer data, gint fd, b_input_condition cond)
struct im_connection *ic = data;
// Check if we are still logged in...
// We are logged in if the flag says so and the connection is still in the connections list.
- if ((ic->flags & OPT_LOGGED_IN) != OPT_LOGGED_IN
- && !g_slist_find( twitter_connections, ic ))
+ if (!g_slist_find( twitter_connections, ic ) ||
+ (ic->flags & OPT_LOGGED_IN) != OPT_LOGGED_IN)
return 0;
// If the user uses multiple private message windows we need to get the
@@ -68,13 +68,15 @@ static void twitter_login( account_t *acc )
struct im_connection *ic = imcb_new( acc );
struct twitter_data *td = g_new0( struct twitter_data, 1 );
+ twitter_connections = g_slist_append( twitter_connections, ic );
+
td->user = acc->user;
td->pass = acc->pass;
td->home_timeline_id = 0;
ic->proto_data = td;
- imcb_log( ic, "Connecting to twitter" );
+ imcb_log( ic, "Connecting to Twitter" );
imcb_connected(ic);
// Run this once. After this queue the main loop function.
@@ -83,8 +85,6 @@ static void twitter_login( account_t *acc )
// Queue the main_loop
// Save the return value, so we can remove the timeout on logout.
td->main_loop_id = b_timeout_add(60000, twitter_main_loop, ic);
-
- twitter_connections = g_slist_append( twitter_connections, ic );
}
/**