Changeset d9ce18c


Ignore:
Timestamp:
2010-03-07T19:09:48Z (14 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
f4d37c6
Parents:
d1d5b34
Message:

Prefix the edited messages with "EDIT:"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    rd1d5b34 rd9ce18c  
    106106         * event, so store the failure code here till then */
    107107        int failurereason;
     108        /* If this is just an update of an already received message. */
     109        int is_edit;
    108110};
    109111
     
    514516                if (!strcmp(info, "STATUS RECEIVED"))
    515517                        skype_printf(ic, "GET CHATMESSAGE %s BODY\n", id);
     518                else
     519                        sd->is_edit = 1;
    516520                skype_printf(ic, "GET CHATMESSAGE %s TYPE\n", id);
    517521                skype_printf(ic, "GET CHATMESSAGE %s CHATNAME\n", id);
     
    549553                                if (!strcmp(sd->type, "SAID") ||
    550554                                        !strcmp(sd->type, "EMOTED")) {
    551                                         if (!strcmp(sd->type, "SAID"))
    552                                                 g_snprintf(buf, IRC_LINE_SIZE, "%s",
    553                                                         body);
     555                                        if (!strcmp(sd->type, "SAID")) {
     556                                                if (!sd->is_edit)
     557                                                        g_snprintf(buf, IRC_LINE_SIZE, "%s",
     558                                                                body);
     559                                                else {
     560                                                        g_snprintf(buf, IRC_LINE_SIZE, "EDIT: %s",
     561                                                                body);
     562                                                        sd->is_edit = 0;
     563                                                }
     564                                        }
    554565                                        else
    555566                                                g_snprintf(buf, IRC_LINE_SIZE, "/me %s",
Note: See TracChangeset for help on using the changeset viewer.