-
Notifications
You must be signed in to change notification settings - Fork 13
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
Be able to kick players #48
Comments
try that |
@haviduck @ecameracci Mind submitting a pull request based on @haviduck's commits above? I have some minor comments but the overall implementation holds up |
Yeah its not finished tho, but u can check out an early, non credited version here: cardsagainst.carlmartin.no. If it breaks, u can kick and generate New roomowner and czar by refreshing. |
Alright, the kicking works, but not in the way I expected. |
Should be fixed now |
That's working better now. It kicks the player, but on my end (room owner), the player still remains on the list of users and if 'Kick' is clicked again, I get a |
Yeah i gotta understand the event classes etc a bit better first, but ill let u know when it works as intended :) |
im not able to reproduce it, the roomowner is redirected to game round when he kicks someone and the list is updated. can you see if it still happens for you @ecameracci ? |
Still seems to be happening to me. I went to cardsagainst.carlmartin.no and continued a game that I already started, there was still one other person in the Users tab so I tried kicking them and they still stayed in the room until I manually refreshed the page. I'm using Firefox, but I'll try with Chrome once I can get someone to help me test this again. |
Alright, I tried again on Chrome and it works as intended on Chrome, so it seems like the issue is with Firefox. |
can this have anything to do with that cache line, @KevinBongart ? |
The application uses cache in several places, in particular the player list, but the cache is on the server side and is invalidated when the game model is updated or when the list of players has changed. If you refresh the page and the player list changes, it's not a cache issue. On some events, the app pushes updates to the clients (currently the updates are just orders to refresh the page, I'm working on smarter updates). For the page to automatically refresh when a player is kicked out, you can trigger FYI, it's a bit difficult for me to provide guidance when we're not using a pull request with code I can look at and comment directly, so I encourage you two to open a PR with the specific feature you want to add, whether it's in this repo or your own, and I'll do my best to help you ship it. |
@KevinBongart hopefully my pr is right. @ecameracci fixed for ff now |
Sorry booted today. Up again now. |
Ok, kicking players works now 👍 |
@haviduck @ecameracci FYI, the game is deployable to Heroku fairly easily and for free, in case you want to test out some features. I originally had it running there until the load went beyond what I was prepared to pay for Heroku, so I moved it to Dokku on a big Linode instance. But if you keep the domain private to a few players, Heroku works quite well. In terms of kicking players, I'll let you open a PR to discuss implementations but the general philosophy I'd like to keep for this application is: no admin, no owner, no creator. Everybody in a game can do everything. Kicking players, for instance, should be available to everybody who's in the game, especially if the person who started the game disconnects. |
Someone who was disconnected was still in the game and there was no way to remove them.
The text was updated successfully, but these errors were encountered: