Class SFS2X.Requests.RoomSettings

The settings required to create a Room using the CreateRoomRequest request.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new RoomSettings instance.

Field Summary

Class Detail

SFS2X.Requests.RoomSettings(name)
Creates a new RoomSettings instance.

The instance must be passed to the CreateRoomRequest class constructor.

Parameters:
{String} name
The name of the Room to be created.
See also:
SFS2X.Requests.System.CreateRoomRequest
SFS2X.Entities.SFSRoom

Field Detail

{Boolean} allowOwnerOnlyInvitation
Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner.
Default Value:
true
{RoomEvents} events
Sets the flags indicating which events related to the Room are dispatched by the SmartFox client.

Room events include: users entering or leaving the room, user count change and user variables update. If set to null, the events configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

Default Value:
null
See also:
SFS2X.Requests.RoomEvents
{RoomExtension} extension
Sets the Extension that must be attached to the Room on the server-side, and its settings.
Default Value:
null
See also:
SFS2X.Requests.RoomExtension
{String} groupId
Sets the id of the Group to which the Room should belong. If the Group doesn't exist yet, a new one is created before assigning the Room to it.
Default Value:
"default"
See also:
SFS2X.Entities.SFSRoom#groupId
{Boolean} isGame
Sets whether the Room is a Game Room or not.
Default Value:
false
{Number} maxSpectators
Sets the maximum number of spectators allowed in the Room (only for Game Rooms).
Default Value:
0
{Number} maxUsers
Sets the maximum number of users allowed in the Room. In case of Game Rooms, this is the maximum number of players.
Default Value:
10
{Number} maxVariables
Sets the maximum number of Room Variables allowed for the Room.
Default Value:
5
{String} name
Defines the name of the Room.
{String} password
Sets the password of the Room. If the password is set to an empty string, the Room won't be password protected.
Default Value:
An empty string

{RoomPermissions} permissions
Sets the flags indicating which operations are permitted on the Room.

Permissions include: name and password change, maximum users change and public messaging. If set to null, the permissions configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

Default Value:
null
See also:
SFS2X.Requests.RoomPermissions
{Array} variables
Sets a list of SFSRooomVariable objects to be attached to the Room.
Default Value:
An empty array
See also:
SFS2X.Entities.Variables.SFSRoomVariable