Mercurial > pidgin
comparison libpurple/protocols/oscar/family_icq.c @ 30637:a1964c506f29
We should always display the "Authorize buddy?" mini-dialog, even
if the buddy doesn't have a non-empty nickname. Fixes #12810.
Also, why the hell did gotalias() return int? That should be void.
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Wed, 27 Oct 2010 18:24:12 +0000 |
parents | 11c54d781835 |
children | a8cc50c2279f |
comparison
equal
deleted
inserted
replaced
30632:bebd0cf0a20f | 30637:a1964c506f29 |
---|---|
406 g_free(stripped); | 406 g_free(stripped); |
407 | 407 |
408 return 0; | 408 return 0; |
409 } | 409 } |
410 | 410 |
411 static int | 411 static void |
412 gotalias(OscarData *od, struct aim_icq_info *info) | 412 gotalias(OscarData *od, struct aim_icq_info *info) |
413 { | 413 { |
414 PurpleConnection *gc = od->gc; | 414 PurpleConnection *gc = od->gc; |
415 PurpleAccount *account = purple_connection_get_account(gc); | 415 PurpleAccount *account = purple_connection_get_account(gc); |
416 gchar who[16], *utf8; | |
417 PurpleBuddy *b; | 416 PurpleBuddy *b; |
418 | 417 gchar *utf8 = oscar_utf8_try_convert(account, od, info->nick); |
419 if (info->nick[0] && (utf8 = oscar_utf8_try_convert(account, od, info->nick))) { | 418 |
420 if (info->for_auth_request) { | 419 if (info->for_auth_request) { |
421 oscar_auth_recvrequest(gc, g_strdup_printf("%u", info->uin), utf8, info->auth_request_reason); | 420 oscar_auth_recvrequest(gc, g_strdup_printf("%u", info->uin), utf8, info->auth_request_reason); |
422 } else { | 421 } else { |
422 if (utf8 && *utf8) { | |
423 gchar who[16]; | |
423 g_snprintf(who, sizeof(who), "%u", info->uin); | 424 g_snprintf(who, sizeof(who), "%u", info->uin); |
424 serv_got_alias(gc, who, utf8); | 425 serv_got_alias(gc, who, utf8); |
425 if ((b = purple_find_buddy(account, who))) { | 426 if ((b = purple_find_buddy(account, who))) { |
426 purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8); | 427 purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8); |
427 } | 428 } |
428 g_free(utf8); | |
429 } | 429 } |
430 g_free(utf8); | |
430 } | 431 } |
431 return 1; | |
432 } | 432 } |
433 | 433 |
434 /** | 434 /** |
435 * Subtype 0x0003 - Response to SNAC_FAMILY_ICQ/0x002, contains an ICQesque packet. | 435 * Subtype 0x0003 - Response to SNAC_FAMILY_ICQ/0x002, contains an ICQesque packet. |
436 */ | 436 */ |