Changeset 2d07803


Ignore:
Timestamp:
2007-10-06T16:05:44Z (16 years ago)
Author:
VMiklos <vmiklos@…>
Branches:
master
Children:
72aa7f0
Parents:
a75f2a7
Message:

handle topic changes

Location:
skype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skype/README

    ra75f2a7 r2d07803  
    184184- Detect when somebody wants to transfer a file
    185185
     186- Handle topic changes
     187
    186188== What needs to be done (aka. TODO)
    187189
     
    191193
    192194  * Send / receive group chat messages.
    193 
    194   * Handle topic changes.
    195195
    196196- Add a question callback for calls.
  • skype/skype.c

    ra75f2a7 r2d07803  
    7070        /* Same for file transfers. */
    7171        skype_filetransfer_status filetransfer_status;
     72        /* True if the next message will be a topic */
     73        int topic;
    7274};
    7375
     
    293295                                                {
    294296                                                        /* New body, we have everything to use imcb_buddy_msg() now! */
    295                                                         imcb_buddy_msg(ic, sd->handle, info, 0, 0);
     297                                                        if(sd->topic)
     298                                                        {
     299                                                                imcb_log(ic, "%s has changed the chat topic to \"%s\"", sd->handle, info);
     300                                                                sd->topic = 0;
     301                                                        }
     302                                                        else
     303                                                                imcb_buddy_msg(ic, sd->handle, info, 0, 0);
    296304                                                }
    297305                                        }
     
    374382                                }
    375383                        }
     384                        else if(!strncmp(line, "CHAT ", 5))
     385                        {
     386                                char *id = strchr(line, ' ');
     387                                if(++id)
     388                                {
     389                                        char *info = strchr(id, ' ');
     390                                        *info = '\0';
     391                                        info++;
     392                                        if(!strncmp(info, "TOPIC ", 6))
     393                                                sd->topic = 1;
     394                                }
     395                        }
    376396                        lineptr++;
    377397                }
Note: See TracChangeset for help on using the changeset viewer.