Mercurial > pidgin
comparison src/protocols/sametime/sametime.c @ 12263:8190a70d2c34
[gaim-migrate @ 14565]
removed GMP dependancy for sametime support. fixed some buddy status issues
as noted in bug #1368136. sametime seems to be working just fine now, and I'm
trying to use HEAD as my primary client for a while to get things going.
committer: Tailor Script <tailor@pidgin.im>
author | Christopher O'Brien <siege@pidgin.im> |
---|---|
date | Tue, 29 Nov 2005 23:37:05 +0000 |
parents | 4d3119205a33 |
children | 0e467757b57a |
comparison
equal
deleted
inserted
replaced
12262:6e55515e4b39 | 12263:8190a70d2c34 |
---|---|
499 } | 499 } |
500 | 500 |
501 gaim_blist_node_set_int(bnode, BUDDY_KEY_TYPE, mwSametimeUser_NORMAL); | 501 gaim_blist_node_set_int(bnode, BUDDY_KEY_TYPE, mwSametimeUser_NORMAL); |
502 } | 502 } |
503 | 503 |
504 gaim_prpl_got_user_status(acct, id, status, NULL); | 504 if(aware->online) { |
505 gaim_prpl_got_user_idle(acct, id, !!idle, idle); | 505 gaim_prpl_got_user_status(acct, id, status, NULL); |
506 gaim_prpl_got_user_idle(acct, id, !!idle, idle); | |
507 | |
508 } else { | |
509 gaim_prpl_got_user_status(acct, id, MW_STATE_OFFLINE, NULL); | |
510 } | |
506 } | 511 } |
507 | 512 |
508 | 513 |
509 static void mw_aware_list_on_attrib(struct mwAwareList *list, | 514 static void mw_aware_list_on_attrib(struct mwAwareList *list, |
510 struct mwAwareIdBlock *id, | 515 struct mwAwareIdBlock *id, |
1680 const char *text) { | 1685 const char *text) { |
1681 struct mwGaimPluginData *pd; | 1686 struct mwGaimPluginData *pd; |
1682 GaimAccount *acct; | 1687 GaimAccount *acct; |
1683 GaimConversation *conv; | 1688 GaimConversation *conv; |
1684 GaimBuddy *buddy; | 1689 GaimBuddy *buddy; |
1685 const char *who = from->user_id; | 1690 char *who = from->user_id; |
1686 char *tmp, *msg; | 1691 char *msg; |
1687 | 1692 |
1688 pd = mwSession_getClientData(s); | 1693 pd = mwSession_getClientData(s); |
1689 acct = gaim_connection_get_account(pd->gc); | 1694 acct = gaim_connection_get_account(pd->gc); |
1690 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, acct); | 1695 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, acct); |
1691 if(! conv) conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, who); | 1696 if(! conv) conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, who); |
1692 | 1697 |
1693 buddy = gaim_find_buddy(acct, who); | 1698 buddy = gaim_find_buddy(acct, who); |
1694 if(buddy) { | 1699 if(buddy) who = (char *) gaim_buddy_get_contact_alias(buddy); |
1695 who = gaim_buddy_get_contact_alias(buddy); | 1700 |
1696 } | 1701 who = g_strdup_printf(_("Announcement from %s"), who); |
1697 | |
1698 tmp = g_strdup_printf(_("Announcement from %s"), who); | |
1699 msg = gaim_markup_linkify(text); | 1702 msg = gaim_markup_linkify(text); |
1700 | 1703 |
1701 gaim_conversation_write(conv, tmp, msg, GAIM_MESSAGE_RECV, time(NULL)); | 1704 gaim_conversation_write(conv, who, msg, GAIM_MESSAGE_RECV, time(NULL)); |
1702 g_free(tmp); | 1705 g_free(who); |
1703 g_free(msg); | 1706 g_free(msg); |
1704 } | 1707 } |
1705 | 1708 |
1706 | 1709 |
1707 static struct mwSessionHandler mw_session_handler = { | 1710 static struct mwSessionHandler mw_session_handler = { |