diff options
| -rw-r--r-- | protocols/msn/msn.h | 5 | ||||
| -rw-r--r-- | protocols/msn/ns.c | 43 | 
2 files changed, 22 insertions, 26 deletions
| diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index 9727c537..0cd174f2 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -65,8 +65,11 @@ struct msn_data  	GSList *msgq;  	GSList *switchboards; -	int buddycount;  	const struct msn_away_state *away_state; +	 +	int buddycount; +	int groupcount; +	char **grouplist;  };  struct msn_switchboard diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 4ced58a0..57212910 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -256,6 +256,9 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  		if( num_parts == 5 )  		{  			md->buddycount = atoi( cmd[3] ); +			md->groupcount = atoi( cmd[4] ); +			if( md->groupcount > 0 ) +				md->grouplist = g_new0( char *, md->groupcount );  			if( !*cmd[3] || md->buddycount == 0 )  				msn_logged_in( gc ); @@ -268,18 +271,6 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  			msn_logged_in( gc );  		}  	} -	else if( strcmp( cmd[0], "GTC" ) == 0 ) -	{ -	} -	else if( strcmp( cmd[0], "BLP" ) == 0 ) -	{ -	} -	else if( strcmp( cmd[0], "PRP" ) == 0 ) -	{ -	} -	else if( strcmp( cmd[0], "LSG" ) == 0 ) -	{ -	}  	else if( strcmp( cmd[0], "LST" ) == 0 )  	{  		int list; @@ -326,11 +317,22 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  			}  		}  	} -	else if( strcmp( cmd[0], "BPR" ) == 0 ) -	{ -	} -	else if( strcmp( cmd[0], "CHG" ) == 0 ) +	else if( strcmp( cmd[0], "LSG" ) == 0 )  	{ +		int num; +		 +		if( num_parts != 4 ) +		{ +			hide_login_progress_error( gc, "Syntax error" ); +			signoff( gc ); +			return( 0 ); +		} +		 +		http_decode( cmd[2] ); +		num = atoi( cmd[1] ); +		 +		if( num < md->groupcount ) +			md->grouplist[num] = g_strdup( cmd[2] );  	}  	else if( strcmp( cmd[0], "CHL" ) == 0 )  	{ @@ -356,12 +358,6 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  		return( msn_write( gc, buf, strlen( buf ) ) );  	} -	else if( strcmp( cmd[0], "QRY" ) == 0 ) -	{ -	} -	else if( strcmp( cmd[0], "QNG" ) == 0 ) -	{ -	}  	else if( strcmp( cmd[0], "ILN" ) == 0 )  	{  		const struct msn_away_state *st; @@ -478,9 +474,6 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )  			msn_buddy_ask( gc, cmd[4], cmd[5] );  		}  	} -	else if( strcmp( cmd[0], "REM" ) == 0 ) -	{ -	}  	else if( strcmp( cmd[0], "OUT" ) == 0 )  	{  		if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 ) | 
