Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize error when a player is not allowed to join a lobby #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonardochaia
Copy link
Contributor

This PR modifies the signature of BaseLobby.IsPlayerAllowed to include an out string error parameter in order to be able to return an error instead of the default "Player is not allowed" message.

Since this introduces a breaking change for classes who extend BaseLobby, maybe you'd prefer if it would be added as an overload instead. That'd be fine, just let me know and I can implement it, although I believe you'd want to give the user a hint of why he/she is not allowed to join, hence I prefer that the implementation forces you to do so.

Leo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants