Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/presence.c @ 18691:54a5fbeadd7c
Now showing ad-hoc commands of other clients connected to the same account in the account menu (per XEP-0146). Since it is becoming messy in that menu, I also prefixed all ad-hoc commands with the node this command belongs to in [], which is the resource name for clients and the domain name for the server. Examples: "[home] Set status" for clients and "[jabber.org] Send message to all connected users" for servers.
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Fri, 13 Jul 2007 15:34:16 +0000 |
parents | 5c1ed6296b56 |
children | 177552010f1d |
comparison
equal
deleted
inserted
replaced
18690:fdd07827ecb1 | 18691:54a5fbeadd7c |
---|---|
653 flags); | 653 flags); |
654 } | 654 } |
655 g_free(room_jid); | 655 g_free(room_jid); |
656 } else { | 656 } else { |
657 buddy_name = g_strdup_printf("%s%s%s", jid->node ? jid->node : "", | 657 buddy_name = g_strdup_printf("%s%s%s", jid->node ? jid->node : "", |
658 jid->node ? "@" : "", jid->domain); | 658 jid->node ? "@" : "", jid->domain); |
659 if((b = purple_find_buddy(js->gc->account, buddy_name)) == NULL) { | 659 if((b = purple_find_buddy(js->gc->account, buddy_name)) == NULL) { |
660 purple_debug_warning("jabber", "Got presence for unknown buddy %s on account %s (%x)\n", | 660 if(!jid->node || strcmp(jid->node,js->user->node) || strcmp(jid->domain,js->user->domain)) { |
661 buddy_name, purple_account_get_username(js->gc->account), js->gc->account); | 661 purple_debug_warning("jabber", "Got presence for unknown buddy %s on account %s (%x)\n", |
662 jabber_id_free(jid); | 662 buddy_name, purple_account_get_username(js->gc->account), js->gc->account); |
663 g_free(avatar_hash); | 663 jabber_id_free(jid); |
664 g_free(buddy_name); | 664 g_free(avatar_hash); |
665 g_free(status); | 665 g_free(buddy_name); |
666 return; | 666 g_free(status); |
667 } | 667 return; |
668 | 668 } else { |
669 if(avatar_hash) { | 669 /* this is a different resource of our own account. Resume even when this account isn't on our blist */ |
670 } | |
671 } | |
672 | |
673 if(b && avatar_hash) { | |
670 const char *avatar_hash2 = purple_buddy_icons_get_checksum_for_user(b); | 674 const char *avatar_hash2 = purple_buddy_icons_get_checksum_for_user(b); |
671 if(!avatar_hash2 || strcmp(avatar_hash, avatar_hash2)) { | 675 if(!avatar_hash2 || strcmp(avatar_hash, avatar_hash2)) { |
672 JabberIq *iq; | 676 JabberIq *iq; |
673 xmlnode *vcard; | 677 xmlnode *vcard; |
674 | 678 |