Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar.c @ 31849:4c046f6564cd
Change the heuristic we use for setting od->icq. We used to set it to
true any time the username contained only digits. Now we set it to try
if account->protocol_id is prpl-icq. This means we're now relying on the
user to tell us whether their account is AIM or ICQ... and I think that's
fine.
The reason for this change is that we/AOL apparently allow the user to
login to ICQ accounts by entering their email address. This means we're
no longer able to look at the username to determine whether it's an AIM
name or an ICQ name.
This was a problem because we were trying to format the spacing/capitalization
in the username if the name was an icq email address, which resulted in
an annoying popup error at login. Fixes #13883.
It's probably safe for this to go into im.pidgin.pidgin (maybe after the
pending release), but I really don't want to keep changing the 2.x.y branch.
I think we need to move on to 3.x.y.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 09 May 2011 04:42:52 +0000 |
parents | d4b7770324f8 |
children | 3e4b6ffbb551 |
comparison
equal
deleted
inserted
replaced
31848:0d4702446530 | 31849:4c046f6564cd |
---|---|
739 g_free(buf); | 739 g_free(buf); |
740 return; | 740 return; |
741 } | 741 } |
742 | 742 |
743 gc->flags |= PURPLE_CONNECTION_HTML; | 743 gc->flags |= PURPLE_CONNECTION_HTML; |
744 if (oscar_util_valid_name_icq((purple_account_get_username(account)))) { | 744 if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq")) { |
745 od->icq = TRUE; | 745 od->icq = TRUE; |
746 gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS; | 746 gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS; |
747 } else { | 747 } else { |
748 gc->flags |= PURPLE_CONNECTION_AUTO_RESP; | 748 gc->flags |= PURPLE_CONNECTION_AUTO_RESP; |
749 } | 749 } |
4579 } | 4579 } |
4580 | 4580 |
4581 const char *oscar_list_icon_icq(PurpleAccount *a, PurpleBuddy *b) | 4581 const char *oscar_list_icon_icq(PurpleAccount *a, PurpleBuddy *b) |
4582 { | 4582 { |
4583 const char *name = b ? purple_buddy_get_name(b) : NULL; | 4583 const char *name = b ? purple_buddy_get_name(b) : NULL; |
4584 if ((b == NULL) || (name == NULL) || oscar_util_valid_name_sms(name)) | 4584 if (name && !oscar_util_valid_name_sms(name) && oscar_util_valid_name_icq(name)) |
4585 { | |
4586 if (a == NULL || oscar_util_valid_name_icq(purple_account_get_username(a))) | |
4587 return "icq"; | |
4588 else | |
4589 return "aim"; | |
4590 } | |
4591 | |
4592 if (oscar_util_valid_name_icq(name)) | |
4593 return "icq"; | 4585 return "icq"; |
4594 return "aim"; | 4586 |
4587 return "icq"; | |
4595 } | 4588 } |
4596 | 4589 |
4597 const char *oscar_list_icon_aim(PurpleAccount *a, PurpleBuddy *b) | 4590 const char *oscar_list_icon_aim(PurpleAccount *a, PurpleBuddy *b) |
4598 { | 4591 { |
4599 const char *name = b ? purple_buddy_get_name(b) : NULL; | 4592 const char *name = b ? purple_buddy_get_name(b) : NULL; |
4600 if ((b == NULL) || (name == NULL) || oscar_util_valid_name_sms(name)) | 4593 if (name && !oscar_util_valid_name_sms(name) && oscar_util_valid_name_icq(name)) |
4601 { | |
4602 if (a != NULL && oscar_util_valid_name_icq(purple_account_get_username(a))) | |
4603 return "icq"; | |
4604 else | |
4605 return "aim"; | |
4606 } | |
4607 | |
4608 if (oscar_util_valid_name_icq(name)) | |
4609 return "icq"; | 4594 return "icq"; |
4595 | |
4610 return "aim"; | 4596 return "aim"; |
4611 } | 4597 } |
4612 | 4598 |
4613 const char *oscar_list_emblem(PurpleBuddy *b) | 4599 const char *oscar_list_emblem(PurpleBuddy *b) |
4614 { | 4600 { |