Changeset 601e813 for account.c


Ignore:
Timestamp:
2006-05-24T23:04:18Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
80c1e4d
Parents:
46ad029 (diff), fc630f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

[merge] Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • account.c

    r46ad029 r601e813  
    5353{
    5454        account_t *a, *ret = NULL;
     55        char *handle, *s;
    5556        int nr;
     57       
     58        /* This checks if the id string ends with (...) */
     59        if( ( handle = strchr( id, '(' ) ) && ( s = strchr( handle, ')' ) ) && s[1] == 0 )
     60        {
     61                struct prpl *proto;
     62               
     63                *s = *handle = 0;
     64                handle ++;
     65               
     66                if( ( proto = find_protocol( id ) ) )
     67                {
     68                        for( a = irc->accounts; a; a = a->next )
     69                                if( a->prpl == proto &&
     70                                    a->prpl->cmp_buddynames( handle, a->user ) == 0 )
     71                                        ret = a;
     72                }
     73               
     74                /* Restore the string. */
     75                handle --;
     76                *handle = '(';
     77                *s = ')';
     78               
     79                if( ret )
     80                        return ret;
     81        }
    5682       
    5783        if( sscanf( id, "%d", &nr ) == 1 && nr < 1000 )
     
    141167void account_off( irc_t *irc, account_t *a )
    142168{
    143         account_offline( a->gc );
     169        a->gc->wants_to_die = TRUE;
     170        signoff( a->gc );
    144171        a->gc = NULL;
    145172        if( a->reconnect )
Note: See TracChangeset for help on using the changeset viewer.