Mercurial > pidgin.yaz
comparison libpurple/conversation.c @ 18003:7935fe8ed901
merge of 'ac83216c7b78e652b47f1fd0bcb91f1eaf2cdf36'
and 'f14ddacb0fca39c611f9756626e529d89514edec'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 10 Jun 2007 16:05:13 +0000 |
parents | 70fb7663a918 4b18cc7b6177 |
children | d40fd7106ebf |
comparison
equal
deleted
inserted
replaced
18002:38a72d6dce7f | 18003:7935fe8ed901 |
---|---|
1534 const char *alias = user; | 1534 const char *alias = user; |
1535 gboolean quiet; | 1535 gboolean quiet; |
1536 PurpleConvChatBuddyFlags flag = GPOINTER_TO_INT(fl->data); | 1536 PurpleConvChatBuddyFlags flag = GPOINTER_TO_INT(fl->data); |
1537 const char *extra_msg = (extra_msgs ? extra_msgs->data : NULL); | 1537 const char *extra_msg = (extra_msgs ? extra_msgs->data : NULL); |
1538 | 1538 |
1539 if (!strcmp(chat->nick, purple_normalize(conv->account, user))) { | 1539 if(!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
1540 const char *alias2 = purple_account_get_alias(conv->account); | 1540 if (!strcmp(chat->nick, purple_normalize(conv->account, user))) { |
1541 if (alias2 != NULL) | 1541 const char *alias2 = purple_account_get_alias(conv->account); |
1542 alias = alias2; | 1542 if (alias2 != NULL) |
1543 else | 1543 alias = alias2; |
1544 { | 1544 else |
1545 const char *display_name = purple_connection_get_display_name(gc); | 1545 { |
1546 if (display_name != NULL) | 1546 const char *display_name = purple_connection_get_display_name(gc); |
1547 alias = display_name; | 1547 if (display_name != NULL) |
1548 alias = display_name; | |
1549 } | |
1550 } else { | |
1551 PurpleBuddy *buddy; | |
1552 if ((buddy = purple_find_buddy(gc->account, user)) != NULL) | |
1553 alias = purple_buddy_get_contact_alias(buddy); | |
1548 } | 1554 } |
1549 } else if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { | |
1550 PurpleBuddy *buddy; | |
1551 if ((buddy = purple_find_buddy(gc->account, user)) != NULL) | |
1552 alias = purple_buddy_get_contact_alias(buddy); | |
1553 } | 1555 } |
1554 | 1556 |
1555 quiet = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_conversations_get_handle(), | 1557 quiet = GPOINTER_TO_INT(purple_signal_emit_return_1(purple_conversations_get_handle(), |
1556 "chat-buddy-joining", conv, user, flag)) | | 1558 "chat-buddy-joining", conv, user, flag)) | |
1557 purple_conv_chat_is_user_ignored(chat, user); | 1559 purple_conv_chat_is_user_ignored(chat, user); |
1632 const char *alias; | 1634 const char *alias; |
1633 | 1635 |
1634 /* Note this for later. */ | 1636 /* Note this for later. */ |
1635 is_me = TRUE; | 1637 is_me = TRUE; |
1636 | 1638 |
1637 alias = purple_account_get_alias(conv->account); | 1639 if(!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
1638 if (alias != NULL) | 1640 alias = purple_account_get_alias(conv->account); |
1639 new_alias = alias; | 1641 if (alias != NULL) |
1640 else | 1642 new_alias = alias; |
1641 { | 1643 else |
1642 const char *display_name = purple_connection_get_display_name(gc); | 1644 { |
1643 if (display_name != NULL) | 1645 const char *display_name = purple_connection_get_display_name(gc); |
1644 alias = display_name; | 1646 if (display_name != NULL) |
1647 alias = display_name; | |
1648 } | |
1645 } | 1649 } |
1646 } else if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { | 1650 } else if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
1647 PurpleBuddy *buddy; | 1651 PurpleBuddy *buddy; |
1648 if ((buddy = purple_find_buddy(gc->account, new_user)) != NULL) | 1652 if ((buddy = purple_find_buddy(gc->account, new_user)) != NULL) |
1649 new_alias = purple_buddy_get_contact_alias(buddy); | 1653 new_alias = purple_buddy_get_contact_alias(buddy); |