Changeset bc736cfa for protocols/msn


Ignore:
Timestamp:
2006-03-21T08:00:12Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1ad104a
Parents:
82898af
Message:

Basic handling of LSG responses.

Location:
protocols/msn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.h

    r82898af rbc736cfa  
    6666        GSList *msgq;
    6767        GSList *switchboards;
     68        const struct msn_away_state *away_state;
     69       
    6870        int buddycount;
    69         const struct msn_away_state *away_state;
     71        int groupcount;
     72        char **grouplist;
    7073};
    7174
  • protocols/msn/ns.c

    r82898af rbc736cfa  
    257257                {
    258258                        md->buddycount = atoi( cmd[3] );
     259                        md->groupcount = atoi( cmd[4] );
     260                        if( md->groupcount > 0 )
     261                                md->grouplist = g_new0( char *, md->groupcount );
    259262                       
    260263                        if( !*cmd[3] || md->buddycount == 0 )
     
    268271                        msn_logged_in( gc );
    269272                }
    270         }
    271         else if( strcmp( cmd[0], "GTC" ) == 0 )
    272         {
    273         }
    274         else if( strcmp( cmd[0], "BLP" ) == 0 )
    275         {
    276         }
    277         else if( strcmp( cmd[0], "PRP" ) == 0 )
    278         {
    279         }
    280         else if( strcmp( cmd[0], "LSG" ) == 0 )
    281         {
    282273        }
    283274        else if( strcmp( cmd[0], "LST" ) == 0 )
     
    327318                }
    328319        }
    329         else if( strcmp( cmd[0], "BPR" ) == 0 )
    330         {
    331         }
    332         else if( strcmp( cmd[0], "CHG" ) == 0 )
    333         {
     320        else if( strcmp( cmd[0], "LSG" ) == 0 )
     321        {
     322                int num;
     323               
     324                if( num_parts != 4 )
     325                {
     326                        hide_login_progress_error( gc, "Syntax error" );
     327                        signoff( gc );
     328                        return( 0 );
     329                }
     330               
     331                http_decode( cmd[2] );
     332                num = atoi( cmd[1] );
     333               
     334                if( num < md->groupcount )
     335                        md->grouplist[num] = g_strdup( cmd[2] );
    334336        }
    335337        else if( strcmp( cmd[0], "CHL" ) == 0 )
     
    357359                return( msn_write( gc, buf, strlen( buf ) ) );
    358360        }
    359         else if( strcmp( cmd[0], "QRY" ) == 0 )
    360         {
    361         }
    362         else if( strcmp( cmd[0], "QNG" ) == 0 )
    363         {
    364         }
    365361        else if( strcmp( cmd[0], "ILN" ) == 0 )
    366362        {
     
    478474                        msn_buddy_ask( gc, cmd[4], cmd[5] );
    479475                }
    480         }
    481         else if( strcmp( cmd[0], "REM" ) == 0 )
    482         {
    483476        }
    484477        else if( strcmp( cmd[0], "OUT" ) == 0 )
Note: See TracChangeset for help on using the changeset viewer.