Kick player WITHOUT RPC. Close connection of a player by the master client without using rpc.

Options
In a game, you normally can kick players with RPC, but where there are hackers, they just reject the RPC and they don't get kickec. How can I close their connection (from a master client)?
I need help. In other games, I used simple tcp, and you was able to do tcpclient.tcp.close(). But in Photon, I don't know. That's a huge problem for photon: The hackers.

Comments

  • G44Gonzalo
    Options
    That's a big problem of Photon Network... Anyways, you can send a lot of RPC to kick them.
    I don't know why sending 500 randoms RPC at the same time is the only way to "force kick" people.
  • jeanfabre
    Options
    Hi,

    You should not send an rpc to kick a player, the master is supposed to handle that with

    PhotonNetwork.CloseConnection(playerTokick);

    https://doc-api.photonengine.com/en/pun/v2/class_photon_1_1_pun_1_1_photon_network.html#aff5d853bfc891f0355ef2bed0a59d342

    Bye,

    Jean
  • Tobias
    Tobias admin
    edited May 2020
    Options
    The client you build is not hosting the game. So it has to tell the server to close someone's connection. If you can do that, hackers will also abuse that system. Same with RPCs to kick hackers.

    Unless you have some custom server code, which verifies (according to your rules) if a kick is valid, you can't simply have this built in. You'd need to a vote on kicks or require some role system in place.

    If you got issues with hackers, the only way to go is to use server side code, have accounts and ban users who you detect and mark as hackers.

    If you are serious about this, I would recommend looking into Photon Server Plugins.
  • G44Gonzalo
    Options
    Ok, thank you for answering :smile:
    I'll search for those things :)