Ignore:
Timestamp:
2006-11-12T23:06:08Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
16b5f86
Parents:
47d3ac4
Message:

Improved handling of JIDs: Bare JIDs are allowed (*sigh*) and case
insensitivity. Probably not complete yet...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r47d3ac4 r0d3f30f  
    217217        int st;
    218218       
    219         bud = jabber_buddy_by_jid( gc, who );
     219        bud = jabber_buddy_by_jid( gc, who, 0 );
    220220       
    221221        node = xt_new_node( "body", message, NULL );
    222222        node = jabber_make_packet( "message", "chat", bud ? bud->full_jid : who, node );
    223223       
    224         if( ( jd->flags & JFLAG_WANT_TYPING ) && bud &&
     224        if( bud && ( jd->flags & JFLAG_WANT_TYPING ) &&
    225225            ( ( bud->flags & JBFLAG_DOES_XEP85 ) ||
    226226             !( bud->flags & JBFLAG_PROBED_XEP85 ) ) )
     
    266266       
    267267        if( strchr( who, '/' ) )
    268                 bud = jabber_buddy_by_jid( gc, who );
     268                bud = jabber_buddy_by_jid( gc, who, 0 );
    269269        else
    270                 bud = g_hash_table_lookup( jd->buddies, who );
     270        {
     271                char *s = jabber_normalize( who );
     272                bud = g_hash_table_lookup( jd->buddies, s );
     273                g_free( s );
     274        }
    271275       
    272276        while( bud )
    273277        {
    274                 serv_got_crap( gc, "Buddy %s/%s (%d) information:\nAway state: %s\nAway message: %s",
    275                                    bud->handle, bud->resource, bud->priority,
     278                serv_got_crap( gc, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
     279                                   bud->full_jid, bud->priority,
    276280                                   bud->away_state ? bud->away_state->full_name : "(none)",
    277281                                   bud->away_message ? : "(none)" );
     
    279283        }
    280284       
    281         jabber_get_vcard( gc, bud ? bud->handle : who );
     285        jabber_get_vcard( gc, bud ? bud->full_jid : who );
    282286}
    283287
     
    329333        jd->flags |= JFLAG_WANT_TYPING;
    330334       
    331         if( ( bud = jabber_buddy_by_jid( gc, who ) ) == NULL )
     335        if( ( bud = jabber_buddy_by_jid( gc, who, 0 ) ) == NULL )
    332336        {
    333337                /* Sending typing notifications to unknown buddies is
Note: See TracChangeset for help on using the changeset viewer.