Plugin, checking users in the Lobby/cutting connection in lobby

We're writing a plugin for the photon server and I'm having trouble understanding how to check information on joined players/peers while they are in the lobby before they join a game/room. I don't see a callback in the photon plugin sections of the website related to things like OnConnectedToMasterServer kind of stuff. We would also like to allow users to ban certain people so we figured it would be best to authenticate before they have a chance to try to join a room. Any help on this issue?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @rstorm000,

    Currently Photon Server plugins are for game server only. So plugins logic covers "only what happens inside a room".
    We would also like to allow users to ban certain people so we figured it would be best to authenticate before they have a chance to try to join a room.

    You should use Custom Authentication.
  • JohnTube said:

    Hi @rstorm000,

    Currently Photon Server plugins are for game server only. So plugins logic covers "only what happens inside a room".

    We would also like to allow users to ban certain people so we figured it would be best to authenticate before they have a chance to try to join a room.

    You should use Custom Authentication.
    So guessing I should be loading up and extending the Loadbalancing solution then right? Do you have any experience in this
  • Update: So I've played around with the custom authentication of https://doc.photonengine.com/en-us/onpremise/current/reference/custom-authentication via Photon.LoadBalancing.dll.config. However this relies of a web service in order to tell if the user is authenticated or not. I would like to be able to use functions inside of the server itself to tell if the connecting party is authenticated. That way we can check with the web service, plus check a block list. Is there a good place to start or function to extend for this?
  • if you do not like to use webservice for that then you may extend MasterClientPeer. there is HandleAuthenticate method, but this will be more complex solution for you, because you need to understand and update our code. and if you change it you will not be able to use cloud version anymore.
  • chvetsov said:

    if you do not like to use webservice for that then you may extend MasterClientPeer. there is HandleAuthenticate method, but this will be more complex solution for you, because you need to understand and update our code. and if you change it you will not be able to use cloud version anymore.

    Thank you, I will start trying and looking into that. The other option we thought of is attempting to ignore all event calls from a client until they have authenticated. Once they connect could we just never call base.OnRaiseEvent(info); until they have gone through our process?

    Also as far as keeping a list of banned users and other authentication, I think we wouldn't be able to use photon cloud anyway with the current system we are making because it relies on a text document full of usernames/ids that are banned. This is supposed to be for people that want to run there own dedicated server and need to be able to manage the settings of it locally without spinning up a web service or relying on us for info. Do you think we are taking a reasonable approach?
  • >Once they connect could we just never call base.OnRaiseEvent(info); until they have gone through our process?
    Raise event can be handled only by GameServer, MasterServer ignores it. and it also ignores everything while user is not authenticated, same for GameServer.

    >This is supposed to be for people that want to run there own dedicated server and need to be able to manage the settings of it locally without spinning up a web service or relying on us for info.

    please write to developer@photonengine.com and explain what you want to get in order to clarify licensing questions.