Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • account.c

    rb7d3cc34 r547f937  
    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.