1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Transfer on login

Discussion in 'Development' started by SOFe, May 1, 2017.

  1. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    If the player is transferred (Player::transfer()) in PlayerPreLoginEvent or PlayerLoginEvent, should the event be cancelled?
     
  2. moska

    moska Baby Zombie

    Messages:
    105
    GitHub:
    supermaxalex
    It still uses the TransferPacket, so - No.
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    If not cancelled, server will continue to evaluate the user login.
     
  4. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    The player will be closed when they are transferred. That might cause some issues, not sure.
     
  5. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    sidenote; shouldnt this be in RFCs?
    it should be evaluated as kicked
    problem lies in, some plugin would need that to example, logging of users
    some plugin would use @prioritity MONITOR which if it's canceled they cant log it
    but some plugins would try to do something like send message which i suspect will cause issues
    i think no, developers are responsible of checking players are online, or to use a hack of delayed transfer thus allowing plugins to do whatever they needed to do without breaking everything
     
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    No need to log. In Player->transfer(), the player is closed anyway. If they ignore cancelled events, they don't want to log kick players.
    Plugins shouldn't handle kicked players.
     
  7. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    yes i acknowledge that's the worst example, what if a plugin just want to log even kicked players?
    we shouldnt assume no one will want to do that and panic when we realize there's no way to do such
    maybe i should just abandon my bad analogy
    propose would be a disconnect reason transferred on connect
     
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Then the plugin should either not handle the event at MONITOR priority or should not enable ignoreCancelled.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.