Changeset a7af5f0
- Timestamp:
- 2007-10-17T22:59:41Z (17 years ago)
- Branches:
- master
- Children:
- edf09c6
- Parents:
- f8674db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
rf8674db ra7af5f0 65 65 * imcb_buddy_msg() when we got the chatname. */ 66 66 char *handle; 67 char *body; 67 /* List, because of multiline messages. */ 68 GList *body; 68 69 char *type; 69 70 /* This is necessary because we send a notification when we get the … … 314 315 { 315 316 info += 5; 316 g_free(sd->body); 317 sd->body = g_strdup(info); 317 sd->body = g_list_append(sd->body, g_strdup(info)); 318 318 } 319 319 else if(!strncmp(info, "TYPE ", 5)) … … 329 329 { 330 330 struct groupchat *gc = skype_chat_by_name(ic, info); 331 if(!strcmp(sd->type, "SAID")) 331 int i; 332 for(i=0;i<g_list_length(sd->body);i++) 332 333 { 333 if(!gc) 334 /* Private message */ 335 imcb_buddy_msg(ic, sd->handle, sd->body, 0, 0); 336 else 337 /* Groupchat message */ 338 imcb_chat_msg(gc, sd->handle, sd->body, 0, 0); 334 char *body = g_list_nth_data(sd->body, i); 335 if(!strcmp(sd->type, "SAID")) 336 { 337 if(!gc) 338 /* Private message */ 339 imcb_buddy_msg(ic, sd->handle, body, 0, 0); 340 else 341 /* Groupchat message */ 342 imcb_chat_msg(gc, sd->handle, body, 0, 0); 343 } 344 else if(!strcmp(sd->type, "SETTOPIC")) 345 { 346 if(gc) 347 imcb_chat_topic(gc, sd->handle, body); 348 } 349 else if(!strcmp(sd->type, "LEFT")) 350 { 351 if(gc) 352 imcb_chat_remove_buddy(gc, sd->handle, NULL); 353 } 339 354 } 340 else if(!strcmp(sd->type, "SETTOPIC")) 341 { 342 if(gc) 343 imcb_chat_topic(gc, sd->handle, sd->body); 344 } 345 else if(!strcmp(sd->type, "LEFT")) 346 { 347 if(gc) 348 imcb_chat_remove_buddy(gc, sd->handle, NULL); 349 } 355 g_list_free(sd->body); 356 sd->body = NULL; 350 357 } 351 358 }
Note: See TracChangeset
for help on using the changeset viewer.