Welcome, Guest
  • Author Topic: private chat error when disconnect  (Read 4190 times)

    saschart

    • Jr. Programmer
    • **
    • Posts: 62
      • View Profile
      • Email
    private chat error when disconnect
    « on: 06/24/05, 14:49 »
    Hello,

    Look at this example:
    - 3 users in private chat
    - user3 in private with user1 and user2 in sametime
    - if the user3 disconnect only user2 private chat, user1 are disconnect too

    How can I resolve this error ?

    Thank you
    « Last Edit: 06/27/05, 01:20 by saschart »

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: private chat error when disconnect
    « Reply #1 on: 06/24/05, 14:54 »
    You use the private chat of this site?

    Jorge

    saschart

    • Jr. Programmer
    • **
    • Posts: 62
      • View Profile
      • Email
    Re: private chat error when disconnect
    « Reply #2 on: 06/27/05, 01:25 »
    Hello Mr Solis,


    Sure, I use application from http://www.flash-db.com/Tutorials/privchat/

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: private chat error when disconnect
    « Reply #3 on: 06/27/05, 03:31 »
    Quote
    -user3 in private with user1 and user2 in sametime
    - if the user3 disconnect only user2 private chat, user1 are disconnect too

    Don't understand exactly, but basically all users connected to a private chat with will be disconnected. (in the privchat with 3)

    Jorge

    saschart

    • Jr. Programmer
    • **
    • Posts: 62
      • View Profile
      • Email
    Re: private chat error when disconnect
    « Reply #4 on: 06/29/05, 02:00 »
    You understand right.

    Quote
    all users connected to a private chat with will be disconnected

    For me this is a error. If I am in private with user1 and user2 simultaneous and I close only private room with user1 I want to have chat with user2 without disconnect. How can do this ?

    Thank you

    xxxfrog

    • Server what's that
    • *
    • Posts: 26
      • View Profile
    Re: private chat error when disconnect
    « Reply #5 on: 06/30/05, 08:10 »
    no one know? thats misleading,why close one private room then must close others ???

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: private chat error when disconnect
    « Reply #6 on: 07/01/05, 08:12 »
    Yep, I see the problem. When the private room close, it pass just the owner username to the SO, so all users close the room with it. It's neccesary to pass also the other name , so if it match yours, you don't close it inside the client_so.onDisconnect handler on Main timeline. I'll recheck this bug as far as I have some time, thanks for pointing it.

    Jorge

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: private chat error when disconnect
    « Reply #7 on: 07/22/05, 02:51 »
    Ok, bug fixed.

    Jorge

    saschart

    • Jr. Programmer
    • **
    • Posts: 62
      • View Profile
      • Email
    Re: private chat error when disconnect
    « Reply #8 on: 07/22/05, 04:08 »
    Mr Solis,


    I see this modification at you:
    //If the second parameter is my username, user leaves private chatroom with me
    //if is a boolean vale, user leaves application
    client_so.onDisconnect = function(who, app){
        if(app==_global.username || app==true){ ...


    But second parameter is not passed. I think must modify too newRoom script:
    close.onPress = function(){
       //Broadcast disconnection with the guest send to the SO and remove private chat room with guest only
       this._parent._parent.client_so.send("onDisconnect", _global.username, guest);
       this._parent.removeMovieClip();
    }


    also in server side must do modifications but I don't know how.

    Tahanks
    « Last Edit: 07/22/05, 04:10 by saschart »

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: private chat error when disconnect
    « Reply #9 on: 07/22/05, 04:30 »
    Look at this line:

    this._parent._parent.client_so.send("onDisconnect", _global.username, guest);

    The first argument is the kind of message, the second the username, the third the guest (aka the other user)
    That's it.

    Jorge

    saschart

    • Jr. Programmer
    • **
    • Posts: 62
      • View Profile
      • Email
    Re: private chat error when disconnect
    « Reply #10 on: 07/22/05, 05:33 »
    OK work, good luck