Server-side kick of a client, triggered by another client

Hello there. :)

We want to add some small admin capabilities in our online game, one of which is having the power to kick toxic players and hackers out of the game.

I've seen in plenty of places to use PhotonNetwork.CloseConnection(player), and while this does work on most cases, there are some edge cases in which it won't work.

From what I can tell, the CloseConnection call isn't much of a kick, but rather player A saying to player B "Please, leave", and well, someone that is already fiddling with memory locking and NOPing things out from the code in memory can just as well NOP out the LeaveRoom call and become immune to this specific form of kicking. That's why I wanted to find a solution that closed the player connection directly with Photon. Is that at all possible?

Best Answer

Answers

  • JohnTube wrote: »
    Hi @Vallcrist,

    Thank you for choosing Photon!

    We do not have a way of kicking players from client side.
    The only way to do this now is using server code, from Photon Plugins for example.

    How exactly can I kick a player from a Photon Plugin? I have found no documentation on calling any disconnect function for a client.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @JPGOrdon,

    I replied here.