diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-25 10:54:25 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-25 10:54:25 +0200 | 
| commit | 42acba19c3d3911a157cda31b18508e1d40680d4 (patch) | |
| tree | bd8f9ddcdc14e005a76f4551deb56bf7a9d5064c /protocols | |
| parent | 8b0121711986494410bb9d224e90a5dab1dcc601 (diff) | |
Some support for changing group info on OSCAR.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/oscar/oscar.c | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 0310a27e..51382a61 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -1942,7 +1942,12 @@ static void oscar_set_away(struct im_connection *ic, char *state, char *message)  static void oscar_add_buddy(struct im_connection *g, char *name, char *group) {  	struct oscar_data *odata = (struct oscar_data *)g->proto_data; -	aim_ssi_addbuddies(odata->sess, odata->conn, OSCAR_GROUP, &name, 1, 0); +	bee_user_t *bu; +	 +	if (group && (bu = bee_user_by_handle(g->bee, g, name)) && bu->group) +		aim_ssi_movebuddy(odata->sess, odata->conn, bu->group->name, group, name); +	else +		aim_ssi_addbuddies(odata->sess, odata->conn, group ? : OSCAR_GROUP, &name, 1, 0);  }  static void oscar_remove_buddy(struct im_connection *g, char *name, char *group) { @@ -2066,10 +2071,13 @@ static int gaim_ssi_parseack( aim_session_t *sess, aim_frame_t *fr, ... )  		list = (char *) origsnac->data;  		for( i = 0; i < count; i ++ )  		{ +			struct aim_ssi_item *ssigroup = aim_ssi_itemlist_findparent( sess->ssi.items, list ); +			char *group = ssigroup ? ssigroup->name : NULL; +			  			st = aimbs_get16( &fr->data );  			if( st == 0x00 )  			{ -				imcb_add_buddy( sess->aux_data, normalize(list), NULL ); +				imcb_add_buddy( sess->aux_data, normalize(list), group );  			}  			else if( st == 0x0E )  			{ | 
