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

add max players feature & option to hide offline players #354

Merged
merged 8 commits into from
Feb 5, 2025

Conversation

VillainsRule
Copy link
Contributor

closes #344, closes #353
i did something good
this took way too long

@VillainsRule
Copy link
Contributor Author

bonus commit!!

@VillainsRule
Copy link
Contributor Author

adding that because I think that modders of qbreader (only me sob) would benefit from having owner information idk remove it if you want

@geoffrey-wu
Copy link
Member

You should test your PRs before submitting them—currently, you can't connect to a room because room.players[room.ownerId].username won't work because players are created after the server room calls room.connection, which must necessarily happen after checking if the player is allowed to join. (I'm putting in a fix for this now)

@VillainsRule
Copy link
Contributor Author

ops i was tired it worked in theory fr

@VillainsRule
Copy link
Contributor Author

thanks lol <3

@geoffrey-wu
Copy link
Member

No problem! For #353 I was thinking a global cap on the number of players in a room (so not room-specific)

@VillainsRule
Copy link
Contributor Author

oh wait what i didn't get that sob
that sounds like a terrible idea tho some kid would just duplicate tabs and cap it

@geoffrey-wu
Copy link
Member

This already seems like an issue with a per-room setting? Also I was thinking like 500 for the global cap which is the upper end of what you have.

@geoffrey-wu geoffrey-wu merged commit b187793 into qbreader:main Feb 5, 2025
1 check passed
@geoffrey-wu
Copy link
Member

Thanks for the PR!

@VillainsRule
Copy link
Contributor Author

for (let i = 0; i < 500; i++) new WebSocket(`wss://qbreader.org/multiplayer/cocaine?roomName=cocaine&userId=cocaine${i}&username=cocaine`);

honestly i'm not sure why you thought this was at all a good idea
you should at least have a disable option and disable this until you've fixed websocket botting

@geoffrey-wu
Copy link
Member

Sorry how does your solution fix this problem? Also there's nothing stopping people from making a million rooms, etc.

@VillainsRule
Copy link
Contributor Author

it doesn't fix the problem, i misinterpreted the issue, i just think the original issue idea is not particularly smart

yeah people can also still make 1 million rooms if they want to, literally add .close(); to the code up there and change the for loop #

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.

Add cap on number of players in a multiplayer room Add option to hide inactive players in multiplayer room
2 participants