Changeset e1d6b38


Ignore:
Timestamp:
2013-01-01T16:04:34Z (11 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
757e1e0
Parents:
7764fb1
Message:

skype: make checkpatch happy again (cosmetics)

Location:
protocols/skype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/Makefile

    r7764fb1 re1d6b38  
    6262# take this from the kernel
    6363check:
    64         perl checkpatch.pl --no-tree --file skype.c
     64        perl checkpatch.pl --show-types --ignore LONG_LINE,CAMELCASE --no-tree --file skype.c
    6565
    6666test: all
  • protocols/skype/skype.c

    r7764fb1 re1d6b38  
    214214        bla->handle = g_strdup(handle);
    215215
    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);
    218217        imcb_ask(ic, buf, bla, skype_buddy_ask_yes, skype_buddy_ask_no);
    219218        g_free(buf);
     
    409408                        g_string_free(st, TRUE);
    410409                }
    411         }
    412         else if (!strncmp(ptr, "BIRTHDAY ", 9)) {
     410        } else if (!strncmp(ptr, "BIRTHDAY ", 9)) {
    413411                sd->info_birthday = g_strdup(ptr + 9);
    414412
     
    566564}
    567565
     566static 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
    568587static void skype_parse_chatmessage(struct im_connection *ic, char *line)
    569588{
    570589        struct skype_data *sd = ic->proto_data;
    571         char buf[IRC_LINE_SIZE];
    572590        char *id = strchr(line, ' ');
    573591
     
    627645                                if (!strcmp(sd->type, "SAID") ||
    628646                                        !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);
    650648                                } else if (!strcmp(sd->type, "SETTOPIC") && gc)
    651649                                        imcb_chat_topic(gc,
     
    716714                case SKYPE_CALL_RINGING:
    717715                        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);
    720717                        else {
    721718                                g_snprintf(buf, IRC_LINE_SIZE,
     
    12311228        skype_printf(ic, "SET USERSTATUS OFFLINE\n");
    12321229
    1233         while( ic->groupchats )
     1230        while (ic->groupchats)
    12341231                imcb_chat_free(ic->groupchats->data);
    12351232
Note: See TracChangeset for help on using the changeset viewer.