Changeset bf02a67 for account.c


Ignore:
Timestamp:
2005-12-15T11:55:27Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
15832cc, bd69a21
Parents:
11e090b (diff), 547f937 (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:

Merged Jelmer's pluginable tree (mainly useful for the Win32 port).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • account.c

    r11e090b rbf02a67  
    2828#include "account.h"
    2929
    30 account_t *account_add( irc_t *irc, int protocol, char *user, char *pass )
     30account_t *account_add( irc_t *irc, struct prpl *prpl, char *user, char *pass )
    3131{
    3232        account_t *a;
     
    4242        }
    4343       
    44         a->protocol = protocol;
     44        a->prpl = prpl;
    4545        a->user = g_strdup( user );
    4646        a->pass = g_strdup( pass );
     
    6666        for( a = irc->accounts; a; a = a->next )
    6767        {
    68                 if( g_strcasecmp( id, proto_name[a->protocol] ) == 0 )
     68                if( g_strcasecmp( id, a->prpl->name ) == 0 )
    6969                {
    7070                        if( !ret )
     
    124124        }
    125125       
    126         if( proto_prpl[a->protocol]->login == NULL )
    127         {
    128                 irc_usermsg( irc, "Support for protocol %s is not included in this BitlBee", proto_name[a->protocol] );
    129                 return;
    130         }
    131        
    132126        cancel_auto_reconnect( a );
    133127       
    134128        u = g_new0 ( struct aim_user, 1 );
    135129        u->irc = irc;
    136         u->protocol = a->protocol;
     130        u->prpl = a->prpl;
    137131        strncpy( u->username, a->user, sizeof( u->username ) - 1 );
    138132        strncpy( u->password, a->pass, sizeof( u->password ) - 1 );
     
    142136        a->reconnect = 0;
    143137       
    144         proto_prpl[a->protocol]->login( u );
     138        a->prpl->login( u );
    145139}
    146140
Note: See TracChangeset for help on using the changeset viewer.