aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-03-29 00:28:46 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-03-29 00:28:46 +0100
commitce81acd6242513c5fcf6cf2224f9b1137701e14e (patch)
treec7749cd23ae2d57ab3c6cde0ba4818381a000bfa /protocols/twitter/twitter.c
parentf01bc6f174e15d5dcc530a0136a556bfbc22d236 (diff)
For #721, add the numbers in front of tweets if show_ids is enabled. Left
to do: Document the feature and allow using the numbers in rt/replies.
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r--protocols/twitter/twitter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index 63f648df..f4230cf7 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -244,6 +244,9 @@ static void twitter_init( account_t *acc )
s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
+ s = set_add( &acc->set, "show_ids", "false", set_eval_bool, acc );
+ s->flags |= ACC_SET_OFFLINE_ONLY;
+
s = set_add( &acc->set, "oauth", def_oauth, set_eval_bool, acc );
}
@@ -290,6 +293,9 @@ static void twitter_login( account_t *acc )
imcb_add_buddy( ic, name, NULL );
imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL );
+ if( set_getbool( &acc->set, "show_ids" ) )
+ td->log = g_new0( struct twitter_log_data, TWITTER_LOG_LENGTH );
+
imcb_log( ic, "Connecting" );
twitter_login_finish( ic );
@@ -318,6 +324,7 @@ static void twitter_logout( struct im_connection *ic )
g_free( td->url_host );
g_free( td->url_path );
g_free( td->pass );
+ g_free( td->log );
g_free( td );
}