Changeset a5f76a2


Ignore:
Timestamp:
2007-11-20T09:46:35Z (16 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
de2f05e
Parents:
9fcaedc0
Message:

if you change the topic then wait for skype to confirm that it was really changed

  • ie if you don't have enough permissions, you won't see a fake topic
  • suggested by wilmer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    r9fcaedc0 ra5f76a2  
    7979        /* The user who invited us to the chat. */
    8080        char* adder;
     81        /* If we are waiting for a confirmation about we changed the topic. */
     82        int topic_wait;
    8183};
    8284
     
    489491                                                info += 6;
    490492                                                struct groupchat *gc = skype_chat_by_name(ic, id);
    491                                                 if(gc && sd->adder)
     493                                                if(gc && (sd->adder || sd->topic_wait))
    492494                                                {
    493                                                         imcb_chat_topic(gc, sd->adder, info);
     495                                                        if(sd->topic_wait)
     496                                                        {
     497                                                                sd->adder = g_strdup(sd->username);
     498                                                                sd->topic_wait = 0;
     499                                                        }
     500                                                        imcb_chat_topic(gc, sd->adder, info, 0);
    494501                                                        g_free(sd->adder);
    495502                                                        sd->adder = NULL;
     
    712719{
    713720        struct im_connection *ic = gc->ic;
     721        struct skype_data *sd = ic->proto_data;
    714722        char *buf;
    715723        buf = g_strdup_printf("ALTER CHAT %s SETTOPIC %s\n", gc->title, message);
    716724        skype_write( ic, buf, strlen( buf ) );
    717725        g_free(buf);
     726        sd->topic_wait = 1;
    718727}
    719728
Note: See TracChangeset for help on using the changeset viewer.