The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

G44Gonzalo
2020-05-10 11:02:12

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
2020-05-24 16:13:01

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
2020-05-25 06:36:45

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
2020-05-25 16:10:51

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
2020-05-28 15:02:32

Ok, thank you for answering :smile:
I'll search for those things :)

Back to top