Changeset 0a3c243 for root_commands.c


Ignore:
Timestamp:
2006-06-30T23:18:56Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5100caa
Parents:
5c9512f
Message:

Got rid of struct aim_user (now using account_t everywhere). Needs some more
testing though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r5c9512f r0a3c243  
    400400                else
    401401                {
    402                         nick_set( irc, cmd[2], a->gc->prpl, cmd[3] );
     402                        nick_set( irc, cmd[2], a->gc->acc->prpl, cmd[3] );
    403403                }
    404404        }
     
    407407           add them to your *real* (server-side) contact list. */
    408408        if( add_for_real )
    409                 a->gc->prpl->add_buddy( a->gc, cmd[2] );
     409                a->gc->acc->prpl->add_buddy( a->gc, cmd[2] );
    410410               
    411411        add_buddy( a->gc, NULL, cmd[2], cmd[2] );
     
    441441        }
    442442       
    443         if( !gc->prpl->get_info )
     443        if( !gc->acc->prpl->get_info )
    444444        {
    445445                irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
     
    447447        else
    448448        {
    449                 gc->prpl->get_info( gc, cmd[2] );
     449                gc->acc->prpl->get_info( gc, cmd[2] );
    450450        }
    451451}
     
    482482                else if( u->send_handler == buddy_send_handler )
    483483                {
    484                         nick_set( irc, u->handle, u->gc->prpl, cmd[2] );
     484                        nick_set( irc, u->handle, u->gc->acc->prpl, cmd[2] );
    485485                }
    486486               
     
    501501        s = g_strdup( u->handle );
    502502       
    503         u->gc->prpl->remove_buddy( u->gc, u->handle, NULL );
     503        u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL );
    504504        user_del( irc, cmd[1] );
    505505        nick_del( irc, cmd[1] );
     
    558558        }
    559559       
    560         if( !gc->prpl->add_deny || !gc->prpl->rem_permit )
     560        if( !gc->acc->prpl->add_deny || !gc->acc->prpl->rem_permit )
    561561        {
    562562                irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
     
    617617        }
    618618       
    619         if( !gc->prpl->rem_deny || !gc->prpl->add_permit )
     619        if( !gc->acc->prpl->rem_deny || !gc->acc->prpl->add_permit )
    620620        {
    621621                irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
     
    733733                if( online == 1 )
    734734                {
    735                         g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
     735                        g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
    736736                        irc_usermsg( irc, format, u->nick, s, "Online" );
    737737                }
     
    744744                if( away == 1 )
    745745                {
    746                         g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
     746                        g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
    747747                        irc_usermsg( irc, format, u->nick, s, u->away );
    748748                }
     
    754754                if( offline == 1 )
    755755                {
    756                         g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name );
     756                        g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name );
    757757                        irc_usermsg( irc, format, u->nick, s, "Offline" );
    758758                }
     
    779779                irc_usermsg( irc, "Your name is `%s'" , a->gc->displayname ? a->gc->displayname : "NULL" );
    780780        }
    781         else if ( !a->gc->prpl->set_info )
     781        else if ( !a->prpl->set_info )
    782782        {
    783783                irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
     
    787787                irc_usermsg( irc, "Setting your name to `%s'", cmd[2] );
    788788               
    789                 a->gc->prpl->set_info( a->gc, cmd[2] );
     789                a->prpl->set_info( a->gc, cmd[2] );
    790790        }
    791791}
     
    806806        for( num = 0; q; q = q->next, num ++ )
    807807                if( q->gc ) /* Not necessary yet, but it might come later */
    808                         irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->prpl->name, q->gc->username, q->question );
     808                        irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->acc->prpl->name, q->gc->username, q->question );
    809809                else
    810810                        irc_usermsg( irc, "%d, BitlBee: %s", num, q->question );
     
    834834                        user_t *u;
    835835                       
     836                        /* FIXME: Hmmm, this is actually pretty dangerous code... REMOVEME? :-) */
    836837                        for( u = irc->users; u; u = u->next )
    837838                                if( u->gc == gc )
    838839                                {
    839                                         u->gc->prpl->remove_buddy( u->gc, u->handle, NULL );
     840                                        u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL );
    840841                                        user_del( irc, u->nick );
    841842                                }
     
    852853        for( n = gc->irc->nicks; n; n = n->next )
    853854        {
    854                 if( n->proto == gc->prpl && !user_findhandle( gc, n->handle ) )
    855                 {
    856                         gc->prpl->add_buddy( gc, n->handle );
     855                if( n->proto == gc->acc->prpl && !user_findhandle( gc, n->handle ) )
     856                {
     857                        gc->acc->prpl->add_buddy( gc, n->handle );
    857858                        add_buddy( gc, NULL, n->handle, NULL );
    858859                }
Note: See TracChangeset for help on using the changeset viewer.