Ignore:
Timestamp:
2007-03-28T05:53:11Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0da65d5
Parents:
723e611
Message:

Preparing for Jabber conference room support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/sb.c

    r723e611 rfa29d093  
    8686}
    8787
    88 struct msn_switchboard *msn_sb_by_id( struct gaim_connection *gc, int id )
    89 {
    90         struct msn_data *md = gc->proto_data;
     88struct msn_switchboard *msn_sb_by_chat( struct conversation *c )
     89{
     90        struct msn_data *md = c->gc->proto_data;
    9191        struct msn_switchboard *sb;
    9292        GSList *l;
     
    9595        {
    9696                sb = l->data;
    97                 if( sb->chat && sb->chat->id == id )
     97                if( sb->chat == c )
    9898                        return( sb );
    9999        }
     
    177177}
    178178
    179 void msn_sb_to_chat( struct msn_switchboard *sb )
     179struct conversation *msn_sb_to_chat( struct msn_switchboard *sb )
    180180{
    181181        struct gaim_connection *gc = sb->gc;
     
    184184        /* Create the groupchat structure. */
    185185        g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session );
    186         sb->chat = serv_got_joined_chat( gc, ++msn_chat_id, buf );
     186        sb->chat = serv_got_joined_chat( gc, buf );
    187187       
    188188        /* Populate the channel. */
     
    196196                sb->who = NULL;
    197197        }
     198       
     199        return sb->chat;
    198200}
    199201
     
    230232        if( sb->chat )
    231233        {
    232                 serv_got_chat_left( gc, sb->chat->id );
     234                serv_got_chat_left( sb->chat );
    233235        }
    234236       
     
    372374                        {
    373375                                g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session );
    374                                 sb->chat = serv_got_joined_chat( gc, ++msn_chat_id, buf );
     376                                sb->chat = serv_got_joined_chat( gc, buf );
    375377                               
    376378                                g_free( sb->who );
     
    610612                        else if( sb->chat )
    611613                        {
    612                                 serv_got_chat_in( gc, sb->chat->id, cmd[1], 0, body, 0 );
     614                                serv_got_chat_in( sb->chat, cmd[1], 0, body, 0 );
    613615                        }
    614616                        else
     
    669671                        else if( sb->chat )
    670672                        {
    671                                 serv_got_chat_in( gc, sb->chat->id, cmd[1], 0, buf, 0 );
     673                                serv_got_chat_in( sb->chat, cmd[1], 0, buf, 0 );
    672674                        }
    673675                        else
Note: See TracChangeset for help on using the changeset viewer.