Any callback from when a room closes? Or webhook?

Options
I keep a database of matches -- it'd be nice to cleanup for games that never actually get started (in a matchmaking environment). Is it possible to trigger a webhook when the room closes somehow?

Or, more intuitively, if the master leaves and is the LAST one to leave, it'd be nice to have a special callback to perform cleanup tasks and what not.

OnLeftRoom()
OnLastPlayerLeftRoom()

EDIT: ...although client-side wouldn't work if the last player dirty-disconnected. So yeah, I suppose a server-side callback/webhook would be best.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited April 2018
    Options
    Hi @xblade724,

    There is a webhook for when Photon Server is about to dispose of a room: PathClose.
    Or if you want to know when the last player left you can do so using PathLeave but you need to keep track of who's left and who's still joined using your own counter.