Changeset 7b23afd for account.c


Ignore:
Timestamp:
2005-11-07T16:16:18Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
f7f3ada
Parents:
fe51bcf
Message:

Migrate my pluginable branch to use Wilmers' branch as parent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • account.c

    rfe51bcf r7b23afd  
    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 )
     126        if (a->prpl == NULL )
    127127        {
    128                 irc_usermsg( irc, "Support for protocol %s is not included in this BitlBee", proto_name[a->protocol] );
     128                irc_usermsg( irc, "Support for protocol %s is not included in this BitlBee", a->prpl->name );
    129129                return;
    130130        }
     
    134134        u = g_new0 ( struct aim_user, 1 );
    135135        u->irc = irc;
    136         u->protocol = a->protocol;
     136        u->prpl = a->prpl;
    137137        strncpy( u->username, a->user, sizeof( u->username ) - 1 );
    138138        strncpy( u->password, a->pass, sizeof( u->password ) - 1 );
     
    142142        a->reconnect = 0;
    143143       
    144         proto_prpl[a->protocol]->login( u );
     144        a->prpl->login( u );
    145145}
    146146
Note: See TracChangeset for help on using the changeset viewer.