- Timestamp:
- 2007-10-07T14:36:03Z (17 years ago)
- Branches:
- master
- Children:
- ff58445
- Parents:
- d6a371e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
rd6a371e r86278cd 73 73 /* Same for file transfers. */ 74 74 skype_filetransfer_status filetransfer_status; 75 /* Using /j #nick we want to have a groupchat with two people. Usually 76 * not (default). */ 77 char* groupchat_with; 75 78 }; 76 79 … … 434 437 if(!strcmp(info, "STATUS MULTI_SUBSCRIBED")) 435 438 { 436 struct groupchat *gc; 437 gc = imcb_chat_new( ic, id ); 439 imcb_chat_new( ic, id ); 440 } 441 else if(!strcmp(info, "STATUS DIALOG") && sd->groupchat_with) 442 { 443 struct groupchat *gc = imcb_chat_new( ic, id ); 444 /* According to the docs this 445 * is necessary. However it 446 * does not seem the situation 447 * and it would open an extra 448 * window on our client, so 449 * just leave it out. */ 450 /*g_snprintf(buf, 1024, "OPEN CHAT %s\n", id); 451 skype_write(ic, buf, strlen(buf));*/ 452 g_snprintf(buf, 1024, "%s@skype.com", sd->groupchat_with); 453 imcb_chat_add_buddy(gc, buf); 454 imcb_chat_add_buddy(gc, sd->username); 455 g_free(sd->groupchat_with); 456 sd->groupchat_with = NULL; 438 457 } 439 458 else if(!strcmp(info, "STATUS UNSUBSCRIBED")) … … 656 675 } 657 676 677 struct groupchat *skype_chat_with(struct im_connection *ic, char *who) 678 { 679 struct skype_data *sd = ic->proto_data; 680 char *ptr, *nick, *buf; 681 nick = g_strdup(who); 682 ptr = strchr(nick, '@'); 683 if(ptr) 684 *ptr = '\0'; 685 buf = g_strdup_printf("CHAT CREATE %s\n", nick); 686 skype_write(ic, buf, strlen(buf)); 687 g_free(buf); 688 sd->groupchat_with = g_strdup(nick); 689 g_free(nick); 690 return(NULL); 691 } 692 658 693 void init_plugin(void) 659 694 { … … 672 707 ret->chat_leave = skype_chat_leave; 673 708 ret->chat_invite = skype_chat_invite; 709 ret->chat_with = skype_chat_with; 674 710 ret->handle_cmp = g_strcasecmp; 675 711 register_protocol( ret );
Note: See TracChangeset
for help on using the changeset viewer.