CitiesSkylinesMultiplayer / CSM

Source code for the Cities: Skylines Multiplayer mod (CSM)

Home Page:https://citiesskylinesmultiplayer.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the host to reject join requests

kaenganxt opened this issue · comments

Description

The host player should be able to prevent a player from joining the game.

Implementation hints

  • (Optional) Add an option to the host game menu (Panels/HostGamePanel.cs) if joining players need to be accepted
  • Create a new panel for asking the host if the player is allowed to join (see other panels in the Panels folder)
  • Show the panel in Commands/Handler/Internal/ConnectionRequestHandler after the result command is sent.
  • If the host rejects the request, disconnect the client
  • If the host accepts, continue with the join process

I'm currently working on this. I'm struggling a bit with how to get the player name from the request handler to the panel in a clean way. Creating a PR for this