diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 |
commit | 2945c6ff5d1848f6d8e51a0d804a2d769e6894a7 (patch) | |
tree | 595788105189dab5270fe2b7dc4e9baffa487aed /protocols/twitter/twitter_lib.c | |
parent | ef14a83adbb9036c0006ad460c5e11882a3d7e13 (diff) | |
parent | 593971d9ff9f246cec5af5583f29e45fee62edfe (diff) |
Merge ui-fix (which includes killerbee (i.e. file transfers and libpurple
support)). ui-fix rewrites the complete IRC core, fixing many things that
were broken/hacky/limited so far.
The list is too long to include here, but http://wiki.bitlbee.org/UiFix
has a summary, as does doc/CHANGES and of course the full revision history.
Diffstat (limited to 'protocols/twitter/twitter_lib.c')
-rw-r--r-- | protocols/twitter/twitter_lib.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 0578c5e0..620850ab 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -116,7 +116,7 @@ static void twitter_add_buddy(struct im_connection *ic, char *name, const char * struct twitter_data *td = ic->proto_data; // Check if the buddy is allready in the buddy list. - if (!imcb_find_buddy( ic, name )) + if (!bee_user_by_handle( ic->bee, ic, name )) { char *mode = set_getstr(&ic->acc->set, "mode"); @@ -124,7 +124,12 @@ static void twitter_add_buddy(struct im_connection *ic, char *name, const char * imcb_add_buddy( ic, name, NULL ); imcb_rename_buddy( ic, name, fullname ); if (g_strcasecmp(mode, "chat") == 0) + { + /* Necessary so that nicks always get translated to the + exact Twitter username. */ + imcb_buddy_nick_hint( ic, name, name ); imcb_chat_add_buddy( td->home_timeline_gc, name ); + } else if (g_strcasecmp(mode, "many") == 0) imcb_buddy_status( ic, name, OPT_LOGGED_IN, NULL, NULL ); } @@ -458,7 +463,7 @@ static void twitter_groupchat_init(struct im_connection *ic) td->home_timeline_gc = gc = imcb_chat_new( ic, "home/timeline" ); - name_hint = g_strdup_printf( "Twitter_%s", ic->acc->user ); + name_hint = g_strdup_printf( "%s_%s", td->prefix, ic->acc->user ); imcb_chat_name_hint( gc, name_hint ); g_free( name_hint ); } @@ -518,7 +523,7 @@ static void twitter_private_message_chat(struct im_connection *ic, GSList *list) if( mode_one ) { - g_snprintf( from, sizeof( from ) - 1, "twitter_%s", ic->acc->user ); + g_snprintf( from, sizeof( from ) - 1, "%s_%s", td->prefix, ic->acc->user ); from[MAX_STRING-1] = '\0'; } |