I'm creating a multiplayer server where the players can send an invitation to their friends to join, but the players can only join on certain moments, I wanted to update the server data or something like that to know the status of the server before the player tries to join, is this possible?
Answer by Gosen Gao · Jun 22 at 08:17 AM
You can create a data structure to store the information of joinable players, and when you invite a friend, you upload his information and expiration time into this data structure. Then you can send the server detailed info to this friend to let him join the server via the IP and Port. When the server receives a new connection, it should first compare the information of the connector with the joinable list to determine whether the player is in the list and whether the joining permission has expired. Only if he is authenticated will he be connected to the game service.
Thank you a lot! I'm going to try to do something like that