Changeset 46641bf
- Timestamp:
- 2011-01-03T03:13:00Z (14 years ago)
- Branches:
- master
- Children:
- 2b183e4
- Parents:
- 46e9822
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r46e9822 r46641bf 110 110 /* List of struct skype_group* */ 111 111 GList *groups; 112 /* Pending user which has to be added to the next group which is 113 * created. */ 114 char *pending_user; 112 115 }; 113 116 … … 865 868 log_message(LOGLVL_ERROR, 866 869 "No skype group with id %s. That's probably a bug.", id); 867 } else if (!strncmp(info, "NROFUSERS ", 10)) 868 /* Number of users changed in this group, query its type to see 869 * if it's a custom one we should care about. */ 870 skype_printf(ic, "GET GROUP %s TYPE", id); 870 } else if (!strncmp(info, "NROFUSERS ", 10)) { 871 if (!sd->pending_user) { 872 /* Number of users changed in this group, query its type to see 873 * if it's a custom one we should care about. */ 874 skype_printf(ic, "GET GROUP %s TYPE", id); 875 return; 876 } 877 878 /* This is a newly created group, we have a single user 879 * to add. */ 880 struct skype_group *sg = skype_group_by_id(ic, atoi(id)); 881 882 if (sg) { 883 skype_printf(ic, "ALTER GROUP %d ADDUSER %s", sg->id, sd->pending_user); 884 g_free(sd->pending_user); 885 sd->pending_user = NULL; 886 } else 887 log_message(LOGLVL_ERROR, 888 "No skype group with id %s. That's probably a bug.", id); 889 } 871 890 else if (!strcmp(info, "TYPE CUSTOM_GROUP")) 872 891 /* This one is interesting, query its users. */ … … 1311 1330 static void skype_add_buddy(struct im_connection *ic, char *who, char *group) 1312 1331 { 1332 struct skype_data *sd = ic->proto_data; 1313 1333 char *nick, *ptr; 1314 1334 … … 1326 1346 1327 1347 if (!sg) { 1328 // TODO1329 1348 /* No such group, we need to create it, then have to 1330 1349 * add the user once it's created. */ 1331 //skype_printf(ic, "CREATE GROUP %s", group); 1350 skype_printf(ic, "CREATE GROUP %s", group); 1351 sd->pending_user = g_strdup(nick); 1332 1352 } else { 1333 1353 skype_printf(ic, "ALTER GROUP %d ADDUSER %s", sg->id, nick);
Note: See TracChangeset
for help on using the changeset viewer.