Page 1 of 1

Close Game Room

Posted: 07 Jan 2018, 17:18
How to close game room from extension to prevent players join through 'quickJoinGame' ?

Re: Close Game Room

Posted: 08 Jan 2018, 08:50
by Lapo
Under SFS2X you can do this:

Code: Select all


This will deny access to all players, until the "active" flag is set back to true.

If you're asking for the old SFS PRO, there isn't a similar mechanism, but it can be "emulated". Can you explain what you're trying to do?


Re: Close Game Room

Posted: 08 Jan 2018, 10:43
Hi Lapo.

I need somehow to prevent players to join room when some conditions went true. And i think 'setActive' will fit my requirements.
But you said that room will become 'inactive', it means that this room will not receive any events/requests?


Re: Close Game Room

Posted: 08 Jan 2018, 14:39
by Lapo
Yeah, the inactivation of a Room is useful when no one is inside.
Otherwise I'd recommend using a server-side check. Either:

1) Send you join requests to your Extension and perform the "check logic" there, before joining
2) Implement a request filter, which works in a similar manner: by running your custom code before a system request (such as joinRoom) is executed. More on this here: ... er-filters

Hope it helps