Changeset e1d6b38
- Timestamp:
- 2013-01-01T16:04:34Z (12 years ago)
- Branches:
- master
- Children:
- 757e1e0
- Parents:
- 7764fb1
- Location:
- protocols/skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/skype/Makefile
r7764fb1 re1d6b38 62 62 # take this from the kernel 63 63 check: 64 perl checkpatch.pl -- no-tree --file skype.c64 perl checkpatch.pl --show-types --ignore LONG_LINE,CAMELCASE --no-tree --file skype.c 65 65 66 66 test: all -
protocols/skype/skype.c
r7764fb1 re1d6b38 214 214 bla->handle = g_strdup(handle); 215 215 216 buf = g_strdup_printf("The user %s wants to add you to " 217 "his/her buddy list, saying: '%s'.", handle, message); 216 buf = g_strdup_printf("The user %s wants to add you to his/her buddy list, saying: '%s'.", handle, message); 218 217 imcb_ask(ic, buf, bla, skype_buddy_ask_yes, skype_buddy_ask_no); 219 218 g_free(buf); … … 409 408 g_string_free(st, TRUE); 410 409 } 411 } 412 else if (!strncmp(ptr, "BIRTHDAY ", 9)) { 410 } else if (!strncmp(ptr, "BIRTHDAY ", 9)) { 413 411 sd->info_birthday = g_strdup(ptr + 9); 414 412 … … 566 564 } 567 565 566 static void skype_parse_chatmessage_said_emoted(struct im_connection *ic, struct groupchat *gc, char *body) 567 { 568 struct skype_data *sd = ic->proto_data; 569 char buf[IRC_LINE_SIZE]; 570 if (!strcmp(sd->type, "SAID")) { 571 if (!sd->is_edit) 572 g_snprintf(buf, IRC_LINE_SIZE, "%s", body); 573 else { 574 g_snprintf(buf, IRC_LINE_SIZE, "%s %s", set_getstr(&ic->acc->set, "edit_prefix"), body); 575 sd->is_edit = 0; 576 } 577 } else 578 g_snprintf(buf, IRC_LINE_SIZE, "/me %s", body); 579 if (!gc) 580 /* Private message */ 581 imcb_buddy_msg(ic, sd->handle, buf, 0, 0); 582 else 583 /* Groupchat message */ 584 imcb_chat_msg(gc, sd->handle, buf, 0, 0); 585 } 586 568 587 static void skype_parse_chatmessage(struct im_connection *ic, char *line) 569 588 { 570 589 struct skype_data *sd = ic->proto_data; 571 char buf[IRC_LINE_SIZE];572 590 char *id = strchr(line, ' '); 573 591 … … 627 645 if (!strcmp(sd->type, "SAID") || 628 646 !strcmp(sd->type, "EMOTED")) { 629 if (!strcmp(sd->type, "SAID")) { 630 if (!sd->is_edit) 631 g_snprintf(buf, IRC_LINE_SIZE, "%s", 632 body); 633 else { 634 g_snprintf(buf, IRC_LINE_SIZE, "%s %s", 635 set_getstr(&ic->acc->set, "edit_prefix"), 636 body); 637 sd->is_edit = 0; 638 } 639 } else 640 g_snprintf(buf, IRC_LINE_SIZE, "/me %s", 641 body); 642 if (!gc) 643 /* Private message */ 644 imcb_buddy_msg(ic, 645 sd->handle, buf, 0, 0); 646 else 647 /* Groupchat message */ 648 imcb_chat_msg(gc, 649 sd->handle, buf, 0, 0); 647 skype_parse_chatmessage_said_emoted(ic, gc, body); 650 648 } else if (!strcmp(sd->type, "SETTOPIC") && gc) 651 649 imcb_chat_topic(gc, … … 716 714 case SKYPE_CALL_RINGING: 717 715 if (sd->call_out) 718 imcb_log(ic, "You are currently ringing " 719 "the user %s.", info); 716 imcb_log(ic, "You are currently ringing the user %s.", info); 720 717 else { 721 718 g_snprintf(buf, IRC_LINE_SIZE, … … 1231 1228 skype_printf(ic, "SET USERSTATUS OFFLINE\n"); 1232 1229 1233 while ( ic->groupchats)1230 while (ic->groupchats) 1234 1231 imcb_chat_free(ic->groupchats->data); 1235 1232
Note: See TracChangeset
for help on using the changeset viewer.