Hi everyone,
I have a question about the maxUsers limit in SmartFoxServer 2X Rooms.
- Is there any built-in way to allow moderators/admins to enter a Room even when it has already reached its maxUsers limit?
- Or is the maxUsers check always enforced for all users, including moderators/admins?
I’m also interested in your best practices for this scenario: a large public chat Room with a strict user limit, but where moderators must always be able to join.
Question about maxUsers limit and moderator access in SmartFoxServer 2X
-
ciaoamigos
- Posts: 70
- Joined: 05 Sep 2021, 16:57
Re: Question about maxUsers limit and moderator access in SmartFoxServer 2X
Hi,
SFS2X doesn't check for mods/admins and when the limit is reached, nobody can enter.
However mods and admins still have powers to control the room, kick people out, send messages, alerts and such.
Cheers
SFS2X doesn't check for mods/admins and when the limit is reached, nobody can enter.
However mods and admins still have powers to control the room, kick people out, send messages, alerts and such.
Cheers
-
ciaoamigos
- Posts: 70
- Joined: 05 Sep 2021, 16:57
Re: Question about maxUsers limit and moderator access in SmartFoxServer 2X
If I am an administrator and I try to join a Room with maxUsers = 300 and there are already 300 users inside, SmartFoxServer does NOT let me enter.
Re: Question about maxUsers limit and moderator access in SmartFoxServer 2X
Yes, as stated above, when a Room is full nobody can join.
It seems like a simple problem to solve but in actuality it causes several issues. If moderators could join any Room regardless of limits you could end up with Room counters that look like 40/30 (there are 40 users in a Room for 30 people... what?)
So how many mods/admins should be allowed? 1? 2? infinite? Maybe it can be decided via a setting.
How about game Rooms?
If a game is designed for 4 players (say Poker) and a moderator wants to join anyways, what's going to happen? We now have 5 players?
We could force the moderator to join as spectator.
We'll think about it but we want to come up with a solution that doesn't disrupt the way things work now or breaks compatibility with earlier versions.
In any case, there are several ways in which in you can ensure free Room slots for moderators in your Rooms:
1) Use NPCs as placeholders for mods
When rooms are created you can autojoin an NPC in the Room that "keeps the seat" for a moderator.
When a mod wants to join it can kick the NPC out and take its place
2) Oversized Rooms
If you want a Room to have 300 users, create it with a maxUsers of 305, leaving some empty spots for admins/spots.
Next thing you move the join request to the server side, via Extension and make sure that you refuse any other join request when the capacity (300) has been reached, unless the request comes from a Mod/Admin
#2 is probably the best solution
Cheers
It seems like a simple problem to solve but in actuality it causes several issues. If moderators could join any Room regardless of limits you could end up with Room counters that look like 40/30 (there are 40 users in a Room for 30 people... what?)
So how many mods/admins should be allowed? 1? 2? infinite? Maybe it can be decided via a setting.
How about game Rooms?
If a game is designed for 4 players (say Poker) and a moderator wants to join anyways, what's going to happen? We now have 5 players?
We could force the moderator to join as spectator.
We'll think about it but we want to come up with a solution that doesn't disrupt the way things work now or breaks compatibility with earlier versions.
In any case, there are several ways in which in you can ensure free Room slots for moderators in your Rooms:
1) Use NPCs as placeholders for mods
When rooms are created you can autojoin an NPC in the Room that "keeps the seat" for a moderator.
When a mod wants to join it can kick the NPC out and take its place
2) Oversized Rooms
If you want a Room to have 300 users, create it with a maxUsers of 305, leaving some empty spots for admins/spots.
Next thing you move the join request to the server side, via Extension and make sure that you refuse any other join request when the capacity (300) has been reached, unless the request comes from a Mod/Admin
#2 is probably the best solution
Cheers