_server.joinRoom()
Availability:
SmartFoxServer PRO 1.4.0
Usage:
_server.joinRoom(user, currRoomId, leaveRoom, newRoom, pwd, isSpec, sendUpdate)
Description:
Joins a user into a room from the server side.
Properties:
user | The user to join | |
currRoomId | the id of the current room where the user is already joined (-1 if he's not already joined) | |
leaveRoom | a boolean flag. If true the user will leave the current room after joining the new one | |
newRoom | the id of the new room to join | |
pwd | a password, if needed to join the room | |
isSpec | a boolean flag. If true the user will join in the new room as a spectator (game rooms only) | |
sendUpdate | a boolean flag. Default = true. It will send the default update to all the other clients (optional) |
Returns:
A boolean. True if the join was successful
Example:
var ok = _server.joinRoom(userObj, currId, true, newId) if (ok) trace("Success!")
See also: