Changeset 0da65d5 for irc_commands.c


Ignore:
Timestamp:
2007-03-31T05:40:45Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
aef4828
Parents:
fa29d093
Message:

s/gaim_connection/im_connection/ and some other minor API changes. The rest
will come tomorrow. It compiles, I'll leave the real testing up to someone
else. ;-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    rfa29d093 r0da65d5  
    134134static void irc_cmd_part( irc_t *irc, char **cmd )
    135135{
    136         struct conversation *c;
     136        struct groupchat *c;
    137137       
    138138        if( g_strcasecmp( cmd[1], irc->channel ) == 0 )
     
    150150                irc_part( irc, u, c->channel );
    151151               
    152                 if( c->gc )
     152                if( c->ic )
    153153                {
    154154                        c->joined = 0;
    155                         c->gc->acc->prpl->chat_leave( c );
     155                        c->ic->acc->prpl->chat_leave( c );
    156156                }
    157157        }
     
    173173                        user_t *u = user_find( irc, cmd[1] + 1 );
    174174                       
    175                         if( u && u->gc && u->gc->acc->prpl->chat_open )
     175                        if( u && u->ic && u->ic->acc->prpl->chat_with )
    176176                        {
    177177                                irc_reply( irc, 403, "%s :Initializing groupchat in a different channel", cmd[1] );
    178178                               
    179                                 if( !u->gc->acc->prpl->chat_open( u->gc, u->handle ) )
     179                                if( !u->ic->acc->prpl->chat_with( u->ic, u->handle ) )
    180180                                {
    181181                                        irc_usermsg( irc, "Could not open a groupchat with %s.", u->nick );
     
    201201{
    202202        char *nick = cmd[1], *channel = cmd[2];
    203         struct conversation *c = chat_by_channel( channel );
     203        struct groupchat *c = chat_by_channel( channel );
    204204        user_t *u = user_find( irc, nick );
    205205       
    206         if( u && c && ( u->gc == c->gc ) )
    207                 if( c->gc && c->gc->acc->prpl->chat_invite )
    208                 {
    209                         c->gc->acc->prpl->chat_invite( c, "", u->handle );
     206        if( u && c && ( u->ic == c->ic ) )
     207                if( c->ic && c->ic->acc->prpl->chat_invite )
     208                {
     209                        c->ic->acc->prpl->chat_invite( c, "", u->handle );
    210210                        irc_reply( irc, 341, "%s %s", nick, channel );
    211211                        return;
     
    271271        char *channel = cmd[1];
    272272        user_t *u = irc->users;
    273         struct conversation *c;
     273        struct groupchat *c;
    274274        GList *l;
    275275       
     
    290290                for( l = c->in_room; l; l = l->next )
    291291                {
    292                         if( ( u = user_findhandle( c->gc, l->data ) ) )
     292                        if( ( u = user_findhandle( c->ic, l->data ) ) )
    293293                                irc_reply( irc, 352, "%s %s %s %s %s %c :0 %s", channel, u->user, u->host, irc->myhost, u->nick, u->away ? 'G' : 'H', u->realname );
    294294                }
     
    460460        for( a = irc->accounts; a; a = a->next )
    461461        {
    462                 struct gaim_connection *gc = a->gc;
    463                
    464                 if( gc && gc->flags & OPT_LOGGED_IN )
    465                         bim_set_away( gc, u->away );
     462                struct im_connection *ic = a->ic;
     463               
     464                if( ic && ic->flags & OPT_LOGGED_IN )
     465                        bim_set_away( ic, u->away );
    466466        }
    467467}
     
    476476                irc_reply( irc, 311, "%s %s %s * :%s", u->nick, u->user, u->host, u->realname );
    477477               
    478                 if( u->gc )
    479                         irc_reply( irc, 312, "%s %s.%s :%s network", u->nick, u->gc->acc->user,
    480                                    u->gc->acc->server && *u->gc->acc->server ? u->gc->acc->server : "",
    481                                    u->gc->acc->prpl->name );
     478                if( u->ic )
     479                        irc_reply( irc, 312, "%s %s.%s :%s network", u->nick, u->ic->acc->user,
     480                                   u->ic->acc->server && *u->ic->acc->server ? u->ic->acc->server : "",
     481                                   u->ic->acc->prpl->name );
    482482                else
    483483                        irc_reply( irc, 312, "%s %s :%s", u->nick, irc->myhost, IRCD_INFO );
Note: See TracChangeset for help on using the changeset viewer.