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

Command game_join allows foed players to join #778

Closed
Askaholic opened this issue Apr 20, 2021 · 0 comments · Fixed by #793
Closed

Command game_join allows foed players to join #778

Askaholic opened this issue Apr 20, 2021 · 0 comments · Fixed by #793

Comments

@Askaholic
Copy link
Collaborator

There should really be a check for foed players in LobbyConnection.command_game_join similar to the check that exists when sending party invites here:

if self.player.id in recipient.foes:
return

It is currently possible to join games of players who have foed you because of another bug that allows you to see those games when logging in (see #777). Regardless, game_join should still check for foes to be fully correct.

Askaholic pushed a commit that referenced this issue Jun 3, 2021
* Fix for foes in command_game_join 

Adds a check for a player joining the game to see if they are foed with the host of the game. This is my first attempt at solving an issue so if i fucked up please bear with me.

* added a client error for game_join

added a client error when a player on the hosts foe list tries joining the game.

* changed error message and moved the check down

* removed old code

* changed self.game_service[uuid] to game

* Added a test to confirm the check works

* Fixed steam id for foed player test

* Fixed issues with tests mostly caused by test not being foed with dostya anymore

* Fixed syntax and removed unused code. Also changed some lobbyconnection tests.

* Fixed more spacing issues

* Fixed another spacing issue

* Removed unused variables and added new line at the end of lobbyconnection

* Fixed test_command_game_host.* tests having the wrong lobbyconnection.player. Also removed unneeded in_game variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant